You're trying to call an instance method on the class itself, which
doesn't make sense.
You need to first create an instance of the class to invoke the method on.
i.e.:
instance = TheClass(constuctor_arguments_here)
var1 = instance.method()
Cheers,
Chris
--
http://blog.rebertia.com
> You're trying to call an instance method on the class itself, which
> doesn't make sense.
Oh I don't know, people do it all the time -- just not the way the OP
did :)
> You need to first create an instance of the class to invoke the method
> on. i.e.:
>
> instance = TheClass(constuctor_arguments_here)
> var1 = instance.method()
Or explicitly pass an instance to the method when calling from the class:
TheClass.method(TheClass(constuctor_arguments_here))
Which strangely enough, is useful at times.
class K(parent):
def method(self, args):
x = parent.method(self, args)
return x + 1
--
Steven