name of object inside it's methods?

alv50855 at batman.tamucc.edu alv50855 at batman.tamucc.edu
Sun Feb 27 08:31:08 EST 2000


can someone fill in the blank

-------------------------------
class Hello:
    	def __init__(self, x):
    	    	self.x = x

    	def classname(self):
    	    	<blank>

-------------------------------

>>>from hello import *
>>>clown = Hello(1)
>>>clown.classname()
clown

In other words I want the method to print the name of the object that it 
belongs to





More information about the Python-list mailing list