[EMAIL PROTECTED] wrote: > For example: > > >>> A = [] # let's declare a "constant" here > >>> b = A # and let's assign the constant here > >>> b.append('1') # OOPS! > >>> c = A > >>> print A > ['1'] > >>> print b > ['1'] > >>> print c > ['1'] > > As you can see, the "constant" A can be modified this easily. But if > there were an intuitive mechanism to declare a symbol to be immutable, > then there won't be this problem.
why are you using mutable objects as constants? (insert obligatory "it hurts when I do this" joke here) btw, given a hypothetical "object that symbol points to is immutable" syntax, what would you expect this to do ? >>> constant A = [] >>> b = [A] >>> # much later >>> b[0].append('1') </F> -- http://mail.python.org/mailman/listinfo/python-list