Re: error: argument after ** must be a dictionary

2006-03-01 Thread abcd
i was missing "self" in my method signature! doh! -- http://mail.python.org/mailman/listinfo/python-list

Re: error: argument after ** must be a dictionary

2006-03-01 Thread abcd
Not sure if it matters, but this occurs when running a unittest. The trace back is: Traceback (most recent call last): File "C:\Python24\Lib\threading.py", line 442, in __bootstrap self.run() File "C:\Python24\Lib\threading.py", line 422, in run self.__target(*self.__args, **self.__kwa

Re: error: argument after ** must be a dictionary

2006-03-01 Thread Kent Johnson
bruno at modulix wrote: > abcd wrote: > >>def makeThread(self, func, args=(), kwargs={}): >>threading.Thread(target=self.blah, args=args, >>kwargs=kwargs).start() > > Shouldn't it be: > > def makeThread(self, func, *args, **kwargs): > threading.Thread(target=self.blah, >

Re: error: argument after ** must be a dictionary

2006-03-01 Thread bruno at modulix
abcd wrote: > I have class like this... > > import threading > class MyBlah(object): > def __init__(self): > self.makeThread(self.blah, (4,9)) > > def blah(self, x, y): > print "X and Y:", x, y > > def makeThread(self, func, args=(), kwargs={}): > threading.Th

Re: error: argument after ** must be a dictionary

2006-02-28 Thread Fredrik Lundh
"abcd" <[EMAIL PROTECTED]> wrote: >I have class like this... > > import threading > class MyBlah(object): >def __init__(self): >self.makeThread(self.blah, (4,9)) > >def blah(self, x, y): >print "X and Y:", x, y > >def makeThread(self, func, args=(), kwargs={}): >

error: argument after ** must be a dictionary

2006-02-28 Thread abcd
I have class like this... import threading class MyBlah(object): def __init__(self): self.makeThread(self.blah, (4,9)) def blah(self, x, y): print "X and Y:", x, y def makeThread(self, func, args=(), kwargs={}): threading.Thread(target=self.blah, args=args, kw