diff options
author | Jason Madden <jamadden@gmail.com> | 2018-09-21 16:41:16 -0500 |
---|---|---|
committer | Jason Madden <jamadden@gmail.com> | 2018-09-22 08:19:42 -0500 |
commit | f9dc66fe2089b0a7b15fca841eb8e5a9c8eda6a8 (patch) | |
tree | 4fdefd7806ad95b106865a5c3277b4bbdfe791ca /src | |
parent | 0ea91989e33592155891da0eeace996b0e4d3506 (diff) | |
download | zope-configuration-f9dc66fe2089b0a7b15fca841eb8e5a9c8eda6a8.tar.gz |
Make ``GroupingContextDecorator`` stop shadowing builtins in ``__getattr__``
These were not intended as arguments to be used by subclasses, and the
signature caused confusion. Presumably this was done as an
optimization, but in the absence of any benchmarks or even comments, it
doesn't seem worth the confusion.
Diffstat (limited to 'src')
-rw-r--r-- | src/zope/configuration/config.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/zope/configuration/config.py b/src/zope/configuration/config.py index 41cd5ba..8b41420 100644 --- a/src/zope/configuration/config.py +++ b/src/zope/configuration/config.py @@ -386,7 +386,7 @@ class ConfigurationMachine(ConfigurationAdapterRegistry, ConfigurationContext): reraise(ConfigurationExecutionError(t, v, info), None, tb) finally: - del t, v, tb + del t, v, tb finally: if clear: @@ -597,8 +597,7 @@ class GroupingContextDecorator(ConfigurationContext): for name, v in kw.items(): setattr(self, name, v) - def __getattr__(self, name, - getattr=getattr, setattr=setattr): + def __getattr__(self, name): v = getattr(self.context, name) # cache result in self setattr(self, name, v) @@ -1039,4 +1038,3 @@ def _bootstrap(context): handler="zope.configuration.config.provides", schema="zope.configuration.config.IProvidesDirectiveInfo" ) - |