along the lines, hash and obj. id.

castironpi at gmail.com castironpi at gmail.com
Sun Mar 2 21:50:43 EST 2008


On Feb 27, 5:38 pm, castiro... at gmail.com wrote:
> On Feb 27, 4:16 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> > For a), you use something like obj.a.somemethod(). "obj.a" still refers to
> > the same object, even if it changed internally; if obj.a and foo.bar both
> > were refering to the same object, they still do. [1]
> > Or wrap the value into another shared object.
> it can still set the element there: elem.val= 0, elem.val+= 1, &c., in

Following obj.a.val is foo.bar.val and obj.a is foo.bar, you can also
get away with a= A(); a.c.val= 2; assert A.c.val== 2.



More information about the Python-list mailing list