Message241557
This is a different case from raising an AttributeError inside the __call__;
>>> class C(object):
... def __call__(self):
... raise AttributeError()
...
>>> hasattr(C(), '__call__')
True
>>> class D(object):
... @property
... def __call__(self):
... raise AttributeError()
...
>>> hasattr(C(), '__call__')
False
AttributeError was picked very intentionally for the example.
The docs show that n(args) == n.__call__(args) if n has a __call__; however, if a property raises an AttributeError, then it really does not have a __call__. |
|
Date |
User |
Action |
Args |
2015-04-19 19:36:34 | llllllllll | set | recipients:
+ llllllllll, terry.reedy, belopolsky, christian.heimes, ionelmc, steven.daprano, r.david.murray, Claudiu.Popa, ethan.furman, eric.snow, jedwards |
2015-04-19 19:36:33 | llllllllll | set | messageid: <1429472193.96.0.819314098402.issue23990@psf.upfronthosting.co.za> |
2015-04-19 19:36:33 | llllllllll | link | issue23990 messages |
2015-04-19 19:36:33 | llllllllll | create | |
|