Verifiably better, validated Enum for Python
Gregory Ewing
greg.ewing at canterbury.ac.nz
Wed May 24 18:43:35 EDT 2017
Steve D'Aprano wrote:
> But I'll note that Python has supported read-only
> properties for, oh, a decade or more, and do I hear people complaining
> about how much libraries and applications over-use and abuse properties?
That's not quite the same thing. Python doesn't go out of its
way to support read-only properties; it's just that if you
create a property and don't define what it means to write it,
then it can't be written.
Read-only variables, on the other hand, would require adding
a new concept to the language and extending the interpreter
to support it.
--
Greg
More information about the Python-list
mailing list