diff --git a/tenacity/config.py b/tenacity/config.py index ab10d97..8c4cf3d 100644 --- a/tenacity/config.py +++ b/tenacity/config.py @@ -45,8 +45,7 @@ def __new__(cls): return cls._instance def __init__(self): - if not hasattr(self, '_config'): - self._config = {} + self._config = {} def set_config(self, **kwargs: t.Any) -> None: """Sets multiple configuration parameters.""" @@ -81,6 +80,9 @@ def get_config(self, override: t.Optional[t.Dict[str, t.Any]] = None) -> t.Dict[ def reset_config(self): self._config = {} + def get(self, name: str) -> t.Any: + return self._config.get(name) + def __getattr__(self, name: str) -> t.Any: return self._config.get(name)