Pyenos <py****@pyenos.orgwrote:
-
class WORK:
-
def getwork(self):
-
def choosetable(self):pass
-
choosetable() #TypeError: choosetable() takes exactly 1
-
#argument (0 given)
-
Calling choosetable() at the above location gives me the error
described above.
A function defined inside a method is just a function, it's only when a
function is retrieved from the class dictionary (whether it was defined
there or assigned to the class later) that it becomes a method.
Just leave the self parameter off the choosetable function: you can still
access self from the outer scope of getwork.