<div dir="ltr">I think that syntax would be fine, but then `type.__new__` would need to do something special with that to implement the setter protocol for the types.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 20, 2015 at 11:34 AM, Thomas Güttler <span dir="ltr"><<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guettler.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Am 20.08.2015 um 17:27 schrieb Joseph Jevnik:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How are metaclasses unpythonic? This is one of the more defining features of python. There will be no way to properly<br>
implement this without moving the descriptor up to the metaclass. When thinking about metaclasses, it is often best to<br>
just think of them as classes and other types as instances.<br>
</blockquote>
<br></span>
Yes, metaclasses are a great feature for experts.<br>
<br>
For me this syntax is the most readable:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
class MyClass:<br>
@classproperty<br>
def prop(cls):<br></span>
return '42'-- <br>
</blockquote><div class="HOEnZb"><div class="h5">
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br></div>