This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erik.bray
Recipients barry, erik.bray, guettli, ryanhiebert, yselivanov
Date 2015-08-26.17:16:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440609378.43.0.0148813884653.issue24941@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-08-26 17:16:18erik.braysetrecipients: + erik.bray, barry, guettli, yselivanov, ryanhiebert
2015-08-26 17:16:18erik.braysetmessageid: <1440609378.43.0.0148813884653.issue24941@psf.upfronthosting.co.za>
2015-08-26 17:16:18erik.braylinkissue24941 messages
2015-08-26 17:16:18erik.braycreate