2007/6/8, Sean Farrow <[EMAIL PROTECTED]>: > Hi: > I have defined a class in that class is a method defined as follows: > def splitTime(n): > seconds =float(n) > I call the method in another procedure as follows: > sefl.splitTime(200) > the traceback states that splitTime takes one argument two given. why is > this occuring? > if I try calling it like: > splitTime(200) > I get a name resultion error saying that the global name splitTime is > not defined. > Any help apreciated.
In self.splitTime(200), self is considered an argument as well, thus the definition should be done with: def splitTime(self,n): -- Andre Engels, [EMAIL PROTECTED] ICQ: 6260644 -- Skype: a_engels -- http://mail.python.org/mailman/listinfo/python-list