How to get an object's name as a string?

Shannon Mayne shangach at gmail.com
Tue Oct 28 15:41:21 CET 2008


I would like to create objects with algorithmically determined names
based on other object names and use object names for general algorithm
input.

How would one extract the name of an object from an object instance as
a string. I would think that it is stored as an attribute of the
object but successive 'dir()' calles haven't found me the attribute
with the namestring.

My thanks!




More information about the Python-list mailing list