New submission from Zorceta:
Code and result:
```
class A:
def __init__(self):
self.data = {'a': 1, 'b': 2, 'c': 3}
def __getattr__(self, name):
print('in __getattr__, getting %s' % name)
if name in self.data:
Changes by Zorceta zorc...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24590
___
___
Python-bugs-list
Ethan Furman added the comment:
The error in the example code was in
def __init__(self):
self.data = ...
In order to get around that issue, either `data` needs to be declared at class
scope, or special cased in __getattr__.
--
nosy: +ethan.furman
resolution: - not a bug