On Wed, May 26, 2021 at 1:10 PM Shreyan Avigyan firstname.lastname@example.org wrote:
Reply to Paul Moore:
In Python terms, a constant is a name that binds itself to a value in memory and that name cannot bind itself to a different value now (unlike variables). The value can be mutated (if mutable) but the name cannot bind to a different value once it has bind itself to a value.
Given Python already has a method for annotating a variable (name binding) as 'constant', by using typing.Final, I don't see any need for an alternative syntax for this.
Wouldn't it be simpler to just propose making the compiler/runtime enforce typing.Final annotations at compile and/or run-time?
PEP 591 has all of the definitions and explanation pre-written for you, so that would avoid all the terminology wrangling too ;)
Python-ideas mailing list -- email@example.com To unsubscribe send an email to firstname.lastname@example.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://email@example.com/message/CVMLMQ... Code of Conduct: http://python.org/psf/codeofconduct/