id() trickery

Steffen Ries steffen.ries at
Mon Mar 20 13:42:28 CET 2000

"Cristian Echeverria" <echeverria at> 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.

steffen.ries at	<> Gravity is a myth -- the Earth sucks!

More information about the Python-list mailing list