[Tutor] classproperty for Python 2.7 (read-only enough)
Thomas Güttler
guettliml at thomas-guettler.de
Tue Apr 18 06:00:04 EDT 2017
I would like to have read-only class properties in Python.
I found this http://stackoverflow.com/questions/128573/using-property-on-classmethods
But there are a lot of discussions of things which I don't understand.
I want to be a user of class properties, not an implementer of the details.
I found this: https://pypi.python.org/pypi/classproperty
But above release is more then ten years old. I am unsure if it's dead or mature.
I am using Python 2.7 and attribute getters would be enough, no attribute setter is needed.
My use case is configuration, not fancy algorithms or loops.
Regards,
Thomas Güttler
--
Thomas Guettler http://www.thomas-guettler.de/
More information about the Tutor
mailing list