I wrote the follow program but it didn't work.What wrong with it?
def h(self):
print "Hello World"
if __name__ == '__main__':
hello = type('HelloThread', bases=(threading.Thread,object), dict=dict(hello=h))
The error when it run is that:
TypeError: type.__init__() takes no keyword arguments
My python version is the python2.7