hi.

is there a way to define a class method which prints the instance name?

e.g.:

>>> class class_1:
...   def myName(self):
...     ????what should i do here????
...
>>> instance_1 = class_1()
>>> instance_1.myName()
'instance_1'
>>>

bye

macs
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to