Question about Objects

Mark Roach mrroach at okmaybe.com
Fri Nov 21 16:01:21 CET 2003


On Fri, 21 Nov 2003 09:56:07 -0500, campbell95 wrote:

> I've been hacking visual basic for several years and understand the basic
> concepts of OOP. That said, I'm stumped here with the Python Class.
[...]
>>    def getSomething(self):
>>        return self.something
[...]
>>>>> x.getSomething
>><bound method Test.getSomething of <__main__.Test instance at 0x00C01940>>

you need to actually call the method: x.getSomething()

-Mark




More information about the Python-list mailing list