Determining names of instances

Daniel Klein DanielK at jBASE.com
Mon Jan 15 17:42:52 EST 2001


A question I hope has a simple answer. Take the following simple class and
instance

    class foobar:
        pass

    foo = foobar()

The question is, is there a way for the object 'foo' to know that its name
is 'foo'?

Daniel Klein





More information about the Python-list mailing list