Nick Coghlan added the comment:
To get the behaviour you're requesting, you need to use a custom metaclass and
define the property there. The reason is that the descriptor machinery is
bypassed entirely when setting or deleting an attribute on the class itself:
>>> class Example:
... @prop
Mark Lawrence added the comment:
@"the mulhern" sorry that this slipped under our radar.
@Nick I've put you on the nosy list as you actioned #16267 which is referenced
in msg211416.
--
nosy: +BreamoreBoy, ncoghlan
versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2, Python 3.3, P
New submission from the mulhern:
The problems is that it is quite possible to define a property using @property
in a class and then later to realize that it really ought to be a class method,
not an instance method. But then, if you change it to a class method, using
@classmethod annotation, t