I actually suggest a different kind of Constant in Python not the classical 
const we see in Java or C/C++.

Constants doesn't mean we can't reassign the name to a different value. 
Constants behave like literals. They are sort of literals actually. We 
reference a value by a name. Variable is just a reference to a value and can 
change to provide reference to another value. Constants on the other hand are 
name for a value. So constant is a name we can alternatively use for a value. 
So 10 is same as constant while 10 is same as the value dereferenced by 
variable. 

I propose this logic to work behind the scenes though not sure whether this is 
possible at all.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/NTDZ4EZGKCWRK7FX7WGKF3MOWQUIRT3U/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to