Ethan Furman a écrit : (snip)
The best answer I can give is that you do not want to use 'name' to reference the object itself, but only for printing/debugging purposes.
Which is what the OP stated !-)
'name' is just a label for your object, and not necessarily the only label; that particular label may also be lost... Consider:
(snip example)
As you can see, just because you have saved the original name does not gaurantee that same name will always reference that same object, or any object.
FWIW, the __name__ attributes of functions, classes and modules works just the same...
-- http://mail.python.org/mailman/listinfo/python-list