Message249210
A read-only classproperty is fairly trivial to implement in pure Python and has been done.
A good reason to have a classproperty implementation in CPython would be to support settable/deleteable classproperties. The problem is that can't be done with the descriptor protocol on its own without a custom metaclass. classproperty would have to somehow be special-cased, perhaps in type_setattro, say. I don't know if that can just be done lightly.
Otherwise I don't see the advantage of adding a classproperty type to CPython? |
|
Date |
User |
Action |
Args |
2015-08-26 17:16:18 | erik.bray | set | recipients:
+ erik.bray, barry, guettli, yselivanov, ryanhiebert |
2015-08-26 17:16:18 | erik.bray | set | messageid: <1440609378.43.0.0148813884653.issue24941@psf.upfronthosting.co.za> |
2015-08-26 17:16:18 | erik.bray | link | issue24941 messages |
2015-08-26 17:16:18 | erik.bray | create | |
|