[issue25634] Add a dedicated subclass for attribute missing errors

2015-11-19 Thread Jun Wang
Jun Wang added the comment: I think this is a common problem while using both __getattr__ and descriptor/property. A descriptor example: class Descriptor(): def __get__(self, instance, owner=None): raise AttributeError('Implicitly suppressed') class A(): d

[issue25634] Add a dedicated subclass for attribute missing errors

2015-11-16 Thread Jun Wang
New submission from Jun Wang: See this simple example: class A(): def __init__(self, x=None): self.x = x @property def t(self): return self.x.t def __getattr__(self, name): return 'default' print(A().t