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

2008-10-28 Thread Shannon Mayne
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 succ

Extracting name strings from assigned objects

2008-10-28 Thread Shannon Mayne
I would like to ask how one might obtain the assigned name of an assigned object as a string. I would like to use object names as an algorithmic input. To demonstrate... So if i have: >>foo = {} what can I do to the object 'foo' so as to return the string 'foo'? Thanks! -- http://mail.python.o