
Aug. 20, 2015
11:34 a.m.
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'--