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
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to