[Python-ideas] Properties for classes possible?

Joseph Jevnik joejev at gmail.com
Thu Aug 20 09:00:57 CEST 2015


You can define a property on the metaclass for this effect.

On Thu, Aug 20, 2015 at 2:54 AM, Thomas Güttler <
guettliml at thomas-guettler.de> wrote:

> I think it would be great to have properties for classes in Python2 and
> Python3
>
> There are some "patterns" to get this working:
>
>
> http://stackoverflow.com/questions/5189699/how-can-i-make-a-class-property-in-python
>
>   http://stackoverflow.com/questions/128573/using-property-on-classmethods
>
> ... but an official solution would be more "zen of python".
>
> Do you think properties for classes would be useful?
>
> If it works for classes, then it could be used for modules, too?
>
> Regards,
>   Thomas Güttler
>
> PS: my first post via google groups web interface did not arrive here.
> That's
> the second try. Now via mail.
>
> --
> Thomas Guettler http://www.thomas-guettler.de/
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150820/5eedf434/attachment.html>


More information about the Python-ideas mailing list