Possible constant assignment operators ":=" and "::=" for Python

Fredrik Lundh fredrik at pythonware.com
Wed May 3 03:57:08 EDT 2006


tsaar2003 at yahoo.com wrote:

> Yes, I know that "constant" A will also be modified as the b[0] points
> to A. Obviously the [] should be marked as immutable, as A is declared
> to be constant thus immutable. If somebody tries to modify this
> immutable object an error would occur.

so a constant declaration doesn't only affect the namespace, it also modifies
the type of the object ?

are you sure you know how Python's object model work ?  if you do, please
explain your proposal in terms of what needs to be changed, rather than in
terms of wishful thinking.

</F>






More information about the Python-list mailing list