[Tutor] immutable objects
prem.sah at gmail.com
Tue Oct 31 15:26:37 CET 2006
On 10/31/06, Kent Johnson <kent37 at tds.net> wrote:
> 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?
Im facing a problem with SOAPpy which checks for recursive objects using
In my case value for 2 SOAP headers are same and iam getting a recursion
error. if i pass different object with same value SOAPpy does not complain
(by using str(value) and unicode(value)).
Premnath Sah T. H.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor