Finding the instance reference of an object
Aaron "Castironpi" Brady
castironpi at gmail.com
Thu Oct 16 20:51:43 CEST 2008
On Oct 16, 12:25 pm, Astley Le Jasper <Astley.lejas... at gmail.com>
> Thanks for all the responses. That helps.
If you're sure it's unique, why not just scan through the pairs in
for k, v in locals():
if v is the_object_im_looking_for:
This method can sometimes return more than one name, due to the
variable ordering of objects in dictionaries.
More information about the Python-list