[Tutor] immutable objects

Kent Johnson kent37 at tds.net
Tue Oct 31 15:08:22 CET 2006


Premnath Sah wrote:
> I would like to know how i can guarantee that a new immutable object is 
> infact a new object.
> 
> Example:
> 
>  >>> a = 1
>  >>> b = 1
>  >>> a is b
> True
> 
> is what i get. i want a and b to be two different object.

I don't think there is any way to control this for the builtin types. 
Why do you care?

Kent



More information about the Tutor mailing list