diff options
author | Michael Foord <michael@voidspace.org.uk> | 2011-10-29 21:46:50 +0100 |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2011-10-29 21:46:50 +0100 |
commit | fd86dc9c2d3effb0d09331bf6997dede3710e262 (patch) | |
tree | a90d3014d4720fc1d496224e87d67e9ff683b106 /mock.py | |
parent | 2da69d6b5c0a5eea7019a6e10de6c8d4bf57322a (diff) | |
download | mock-fd86dc9c2d3effb0d09331bf6997dede3710e262.tar.gz |
Move a variable out of a loop
Diffstat (limited to 'mock.py')
-rw-r--r-- | mock.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1791,8 +1791,9 @@ class MagicMixin(object): # don't overwrite existing attributes if called a second time these_magics = these_magics - set(type(self).__dict__) + _type = type(self) for entry in these_magics: - setattr(type(self), entry, MagicProxy(entry, self)) + setattr(_type, entry, MagicProxy(entry, self)) |