Message241640
| Author |
r.david.murray |
| Recipients |
Claudiu.Popa, belopolsky, christian.heimes, eric.snow, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, rhettinger, steven.daprano, terry.reedy |
| Date |
2015年04月20日.13:17:23 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1429535843.55.0.213420982223.issue23990@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The only 'consistency' fix that would make any sense, IMO, would be to disallow special methods to be descriptors. We can't do that for backward compatibility reasons, so that's pretty much case closed.
Eric already mentioned one of the other 'capability' helpers:
rdmurray@pydev:~/python/p35>./python
Python 3.5.0a3+ (default:5612dc5e6af9+, Apr 16 2015, 11:29:58)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo:
... @property
... def __iter__(self):
... raise AttributeError
...
>>> f = Foo
>>> from collections.abc import Iterable
>>> issubclass(Foo, Iterable)
True |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年04月20日 13:17:23 | r.david.murray | set | recipients:
+ r.david.murray, rhettinger, terry.reedy, belopolsky, christian.heimes, ionelmc, steven.daprano, Claudiu.Popa, ethan.furman, eric.snow, llllllllll, jedwards |
| 2015年04月20日 13:17:23 | r.david.murray | set | messageid: <1429535843.55.0.213420982223.issue23990@psf.upfronthosting.co.za> |
| 2015年04月20日 13:17:23 | r.david.murray | link | issue23990 messages |
| 2015年04月20日 13:17:23 | r.david.murray | create |
|