Message241557
| Author |
llllllllll |
| Recipients |
Claudiu.Popa, belopolsky, christian.heimes, eric.snow, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, steven.daprano, terry.reedy |
| Date |
2015年04月19日.19:36:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1429472193.96.0.819314098402.issue23990@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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__. |
|
History
|
|---|
| 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 |
|