[Tutor] Might be a silly question!

Alan Gauld alan.gauld at freenet.co.uk
Fri Feb 11 19:42:02 CET 2005


> Can and if you can how do you set a variable as a constant? 

Only by resorting to tricks involving classes and properties.
There is a cookbook recipe if I recall correctly.

Vanilla Python doesn't have the concept of constants other 
than as a naming convention (all uppercase). Its part of the 
"we are all consenting adults" approach.

Alan G.


More information about the Tutor mailing list