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
More information about the Python-list mailing list
Sun Feb 27 08:31:08 EST 2000
- Previous message (by thread): name of object inside it's methods?
- Next message (by thread): name of object inside it's methods?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): name of object inside it's methods?
- Next message (by thread): name of object inside it's methods?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list