Get the instance name from a list by Reflection

sccs cscs zorg724 at
Sat Oct 20 21:10:34 CEST 2007

I cannot find into documentation how to get the instance name. I found the attributes __dict__,__class__ ,__bases__ __name__ ,
but if i have the code:

class A :pass
a1 = A ()
a2 = A ()
aList = [a1,a2]
for elem in aList :
    print elem.__instance_name__ ???

I expect to have "a1" "a2" ...
But it does not work ...
help please

 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list