id() trickery

Steffen Ries steffen.ries at sympatico.ca
Mon Mar 20 07:42:28 EST 2000


"Cristian Echeverria" <echeverria at interactiva.cl> writes:

> Id() return something like the current address of an object.
> a = b means that a and b are the same objects, if then you write
> b = 100
> print a, will print 100

ehm. It would print 100, if 'b = 100' would modify the object b is
bound to.

Since 'b = 100' binds the name 'b' to a new object, 'a' is
not modified.

hth,
/steffen
-- 
steffen.ries at sympatico.ca	<> Gravity is a myth -- the Earth sucks!



More information about the Python-list mailing list