2014-03-15 | Paul Boddie | raw files shortlog changelog graph | Skip class namespaces when looking for outer namespace definitions of names. | syspython-as-target |
micropython/data.py (file) |
1.1 --- a/micropython/data.py Fri Mar 14 00:21:22 2014 +0100 1.2 +++ b/micropython/data.py Sat Mar 15 12:32:26 2014 +0100 1.3 @@ -227,6 +227,8 @@ 1.4 # Outer scopes. 1.5 1.6 for outer in self.parent_namespaces[::-1]: 1.7 + if isinstance(outer, Class): 1.8 + continue 1.9 if outer.has_key(name): 1.10 print >>sys.stderr, "Warning: name %r in namespace %r is provided by an outer scope: %r" % (name, self.full_name(), outer.full_name()) 1.11 return outer[name], "outer", outer.full_name()