Object Reference question
bruno.42.desthuilliers at websiteburo.invalid
Tue Sep 1 15:55:22 CEST 2009
Ethan Furman a écrit :
> 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:
> 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
FWIW, the __name__ attributes of functions, classes and modules works
just the same...
More information about the Python-list