Message241640
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 |
|
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 | |
|