Pyenos <[EMAIL PROTECTED]> wrote: > [code] > class WORK: > def getwork(self): > def choosetable(self):pass > choosetable() #TypeError: choosetable() takes exactly 1 > #argument (0 given) > [/code] > > 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. -- http://mail.python.org/mailman/listinfo/python-list