Am 19.04.2017 um 09:43 schrieb Alan Gauld via Tutor:
On 19/04/17 08:28, Thomas Güttler wrote:

Nice, if it is that simple.

Is there a reason why this is not in the standard library?

Probably because it is such a rare use case and because
its not that hard to do yourself if you really need it.

But the standard library, like any open source project,
develops as people need things. If nobody needs something
it will never be built and therefore never be added to
the library. I'd guess this falls into that category.

In my virtualenv it looks like it has three implementations. Maybe more with a 
different name.

user@host> find src/ lib/ -name '*.py'|xargs grep -Ei '(def|class) 
classproperty'

lib/python2.7/site-packages/logilab/common/decorators.py:class 
classproperty(object):
lib/python2.7/site-packages/django/utils/decorators.py:class 
classproperty(object):
lib/python2.7/site-packages/mptt/models.py:class classpropertytype(property):



Regards,
  Thomas


--
Thomas Guettler http://www.thomas-guettler.de/
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to