Who am I: can a class instance determine its own name?

Daniel Klein danielk at aracnet.com
Thu Mar 8 09:20:42 EST 2001


On Thu, 08 Mar 2001 17:48:24 +1100, Tim CHURCHES <TCHUR at doh.health.nsw.gov.au>
wrote:

>...can an instance of a class determine the name of the variable to which it is assigned?

It might help if you could tell us why you need to know this? I recently posted
the same question to this group but found that using the object's natural
identity, id(object), proved the best way to manage this.

Daniel Klein
Portland OR USA



More information about the Python-list mailing list