[EMAIL PROTECTED] wrote: > As stated in my first post, I am quite newbie in > Python and miss a simple and intuitive mechanism that would allow to > declare something as constant and that would protect these "constant" > objects from accidental modifications. > > T.S.
Python solution is to rely on the intelligence of programmers. If they see an all caps name and then they try to change it without knowing what they are doing, then they are stupid. If you have stupid programmers there is no way the language can stop them for making disasters. For true constants, this is the end of the story. OTOH, sometimes you want read-only attributes which should not be accidentally overwritten but that are not really constants. In this case, the solution is to use properties. Just google the newsgroup for "properties" and you will find many examples of usage. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list