how do you get the name of a dictionary?

MonkeeSage MonkeeSage at gmail.com
Sat Sep 9 02:06:37 EDT 2006


Dennis Lee Bieber wrote:
> 	id() returns, in C based Python, the memory address at which an
> object is stored. That is all... Names in Python are mapped to the
> object -- essentially they are mapped to the address of the object.
> There is NO intermediate hidden identifier.
>
> [snip]
>
> Object 1 has two names bound to it. But the only way to find out what
> those names are requires first having some other reference bound to the
> object, and then asking each name if the id() (the address) matches the
> id() of the reference in question.

Ahh! I see. That makes sense. Thanks for taking the time to explain it
to a noob. :)

Regards,
Jordan




More information about the Python-list mailing list