Many times a programmer would want a variable that will be a constant. The programmer could have been careless and suddenly changed a very important variable. Proposed syntax,
constant variable = 10 variable = 20 # Error Now constant means making a variable value immutable. It means now we can neither change the variable to point to another value nor the value itself anymore. For example, if we have a list we cannot change it. If we try to then "Error". So for lists, constant variable = ["List"] variable.append("Some") # Error variable = ["Another"] # Error Usually if we have a constant we don't create another reference to it. So do not support two references. Why not? Many reasons, especially deallocation problems. Thanking you, With Regards _______________________________________________ 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/V2CJQ5C5TYZGOCI5P5BHBTHJZFTT6WTX/ Code of Conduct: http://python.org/psf/codeofconduct/