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:
[color=blue][color=green][color=darkred]
>>>class Xyz:[/color][/color][/color]
.... def y(self):
.... q = 2
....[color=blue][color=green][color=darkred]
>>>Xyz.y()[/color][/color][/color]
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!
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:
[color=blue][color=green][color=darkred]
>>>class Xyz:[/color][/color][/color]
.... def y(self):
.... q = 2
....[color=blue][color=green][color=darkred]
>>>Xyz.y()[/color][/color][/color]
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!
Comment