name of an instance

andrea valle andrea.valle at unito.it
Mon Nov 1 05:33:14 EST 2004


Hi to all,
another basic question, but...
How do I access the name of an instance?

I.e., if I have:

class MyClass:
	def __init__(self):
		print "here we are, kids!"

and:
 >>> a = MyClass()

I'd like to have:

 >>> 'a'

Thanks a lot

-a-


Andrea Valle
Laboratorio multimediale "G. Quazza"
Facoltà di Scienze della Formazione
Università degli Studi di Torino
andrea.valle at unito.it



More information about the Python-list mailing list