def _resolve(self, path, dictionary): try: return path.get_value(dictionary) except KeyError as e: raise ResolveError(str(path))
def _resolve(self, ref, context): path = DictPath(self._settings.delimiter, ref) try: return path.get_value(context) except (KeyError, TypeError) as e: raise ResolveError(ref)