>>>>> Edward Elliott <[EMAIL PROTECTED]> (EE) wrote:

>EE> Piet van Oostrum wrote:
>>>>>>>> [EMAIL PROTECTED] (T) wrote:
>>> 
>T> As you can see, the "constant" A can be modified this easily. But if
>T> there were an intuitive mechanism to declare a symbol to be immutable,
>T> then there won't be this problem.
>>> 
>>> Mutability is not a property of symbols but of values. So it doesn't make
>>> sense to declare an identifier to be immutable. And mutability is tied to
>>> the object's type, not to individual instances.

>EE> I think he meant immutable binding, not immutable symbol. So
>EE> rebinding/overshadowing a "constant" A would raise an error, but
>EE> mutating the underlying object A refers to would not (unless it too
>EE> were immutable).

The way I understood it was that he meant both.
-- 
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to