Class Help
Ivan Shevanski
darkpaladin79 at hotmail.com
Sat Oct 1 18:58:45 EDT 2005
To continue with my previous problems, now I'm trying out classes. But I
have a problem (which I bet is easily solveable) that I really don't get.
The numerous tutorials I've looked at just confsed me.For intance:
>>>class Xyz:
... def y(self):
... q = 2
...
>>>Xyz.y()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unbound method y() must be called with Xyz instance as first
argument
(got nothing instead)
So. . .What do I have to do? I know this is an extremley noob question but I
think maybe if a person explained it to me I would finally get it =/
thanks in advance,
-Ivan
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the Python-list
mailing list