# HG changeset patch # User Franz Glasner # Date 1640000748 -3600 # Node ID 48990863b90517eb1ada4c342d375438d9aa0ade # Parent be6ef72c55d5256be7d360f235e54ee965202896 Rename internal cache from __cache to __lookup_cache diff -r be6ef72c55d5 -r 48990863b905 configmix/config.py --- a/configmix/config.py Mon Dec 20 12:43:17 2021 +0100 +++ b/configmix/config.py Mon Dec 20 12:45:48 2021 +0100 @@ -334,12 +334,12 @@ # # PY2.7 compat: must be set before calling the superclass' __init__ # - self.__cache = {} + self.__lookup_cache = {} super(Configuration, self).__init__(*args, **kwds) def clear_cache(self): """Clear the internal lookup cache""" - self.__cache.clear() + self.__lookup_cache.clear() def __getitem__(self, key): """Mapping and list interface that forwards to :meth:`~.getvarl_s` @@ -678,7 +678,7 @@ """ if not path: return self - v = self.__cache.get(path, _MARKER) + v = self.__lookup_cache.get(path, _MARKER) if v is not _MARKER: if v is _MISSING: raise KeyError( @@ -692,14 +692,14 @@ for p in path[1:]: v = eiref(v[p]) except TypeError: - self.__cache[path] = _MISSING + self.__lookup_cache[path] = _MISSING raise KeyError( "Configuration variable %r not found" "(missing intermediate keys?)" % (path,)) except KeyError: - self.__cache[path] = _MISSING + self.__lookup_cache[path] = _MISSING raise - self.__cache[path] = v + self.__lookup_cache[path] = v return v def _lookupref(self, key):