Instance names for classes

Donald 'Paddy' McCarthy paddy3118 at blueyonder.co.ukNOTthisBIT
Fri May 23 04:10:19 EDT 2003


Tony Clarke wrote:
> how can I get a class instance, e g a= b() to return its name, a?

If you were looking for all the keys in a dict whoose value was an 
object (or maybe a certain classes  instances then you vould search the 
dict and maybe add any found keys to the instances/class.

You'd then pass the routine a particular dict, say locals() or globals().

Pad.





More information about the Python-list mailing list