On May 19, 12:04 am, Erik Max Francis m...@alcyone.com wrote:
Adam W. wrote:
I thought I knew how classes worked, but this code sample is making my
second guess myself:
import threading
class nThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
Adam W. awasile...@gmail.com wrote:
If you don't intend to override the constructor in the parent class,
simply don't define it.
Hummm, so lets say I wanted it pass all the variables to the parent
constructor, how would I do that? I wouldn't have to list every
variable it could possible
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
On May 19, 4:30 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
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,
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
Since Thread is
In article mailman.399.1274262243.32709.python-l...@python.org,
Christian Heimes li...@cheimes.de wrote:
class nThread(threading.Thread):
def __init__(self, *args, **kwds):
threading.Thread.__init__(self, *args, **kwds)
# your other stuff here
Since
I thought I knew how classes worked, but this code sample is making my
second guess myself:
import threading
class nThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self,args):
print self.name
print self.args
pants =
Adam W. wrote:
I thought I knew how classes worked, but this code sample is making my
second guess myself:
import threading
class nThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self,args):
print self.name
print self.args