error: argument after ** must be a dictionary



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,
kwargs=kwargs).start()

When I do...
b = MyBlah()

I am getting this error:
TypeError: MyBlah object argument after ** must be a dictionary

What am I missing?

.



Relevant Pages

  • Problem in threading
    ... of a func before and after using threading... ... #!/usr/bin/env python ... def loop: ...
    (comp.lang.python)
  • Re: error: argument after ** must be a dictionary
    ... import threading ... def blah: ... def makeThread(self, func, args=(), kwargs=): ... MyBlah object argument after ** must be a dictionary ...
    (comp.lang.python)
  • Re: error: argument after ** must be a dictionary
    ... abcd wrote: ... import threading ... def blah: ... def makeThread(self, func, args=(), kwargs=): ...
    (comp.lang.python)
  • Re: Docorator Disected
    ... > def get_function(function): # Get func object off stack ... To understand decorator chains it is very helpfull to accept the ... def default: ... The function mul defines the inner functions default, ...
    (comp.lang.python)
  • Re: Name conflict in class hierarchy
    ... def func: ... print 'In B.func, calling A.f1' ... functionality, and I call the new function "func". ... you don't override existing methods in that class unintentionally. ...
    (comp.lang.python)