Class Variable Access and Assignment

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Thu Nov 3 08:27:48 EST 2005


Antoon Pardon enlightened us with:
> I would expect a result consistent with the fact that both times b.a
> would refer to the same object.

"b.a" is just a name, not a pointer to a spot in memory. Getting the
value associated with that name is something different from assigning
a new value to that name.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list