Am 20.08.2015 um 17:27 schrieb Joseph Jevnik:
How are metaclasses unpythonic? This is one of the more defining features of python. There will be no way to properly
implement this without moving the descriptor up to the metaclass. When thinking about metaclasses, it is often best to
just think of them as classes and other types as instances.
Yes, metaclasses are a great feature for experts.
For me this syntax is the most readable:
class MyClass:
@classproperty
def prop(cls):
return '42'--
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/