Possible constant assignment operators ":=" and "::=" for Python
Edward Elliott
nobody at 127.0.0.1
Wed May 3 13:28:38 EDT 2006
Michele Simionato wrote:
> 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.
Which doesn't apply here, one of the OP's examples further up this thread
doesn't modify any ALL CAPS vars directly:
>>> A = [] # let's declare a "constant" here
>>> b = A # and let's assign the constant here
>>> b.append('1') # OOPS!
More information about the Python-list
mailing list