Classes and threading
Gregory Ewing
greg.ewing at canterbury.ac.nz
Wed May 19 04:30:11 EDT 2010
Erik Max Francis wrote:
> Adam W. wrote:
>
>> class nThread(threading.Thread):
>> def __init__(self):
>> threading.Thread.__init__(self)
>
> If you don't intend to override the constructor in the parent class,
> simply don't define it.
Or if you do need to override it for some reason, you
need to accept the extra args and pass them on:
class nThread(threading.Thread):
def __init__(self, *args, **kwds):
threading.Thread.__init__(self, *args, **kwds)
# your other stuff here
--
Greg
More information about the Python-list
mailing list