[Python-ideas] Add an attribute spec descriptor.
Ethan Furman
ethan at stoneleaf.us
Tue Jan 21 15:37:29 CET 2014
On 01/20/2014 10:26 PM, Eric Snow wrote:
>
> Occasionally it would be useful to me to have a class attribute I can
> use to represent an attribute that will exist on *instances* of the
> class. Properties provide that to an extent, but they are data
> descriptors which means they will not defer to like-named instance
> attributes. However, a similar non-data descriptor would fit the
> bill.
Have you checked out Lib/types.py/DynamicClassAttribute ?
It may be worth building on that.
--
~Ethan~
More information about the Python-ideas
mailing list