title: " RuntimeError: thread.__init__() not called" when subclassing threading.Thread
body: <p>I need to run as many threads of class Observer as there are elements in list dirlist.
  When I run it python console it works all right.</p>
  
  <pre><code>class Observer(Thread):
      def run(self):
          naptime = random.randint(1,10)
          print(self.name + ' starting, running for %ss.' % naptime)
          time.sleep(naptime)
          print(self.name + ' done')
  
  observers = {}
  for d in dirlist:
      observers[d] = Observer()
      observers[d].start()
  </code></pre>
  
  <p>But when I try to do it from a Master thread which is supposed to spawn the Observer threads I get errors.</p>
  
  <pre><code>class Master(Thread):
      def __init__(self, dirlist):
          self.dirlist = dirlist
      def run(self):
          observers = {}
          for d in dirlist:
              observers[d] = Observer()
              observers[d].start()
          while True:
              time.sleep(3600)
  
  master_thread = Master(dirlist)
  master_thread.start()
  </code></pre>
  
  <p>The call to <code>Master.start</code> results in:</p>
  
  <blockquote><pre>RuntimeError: thread.__init__() not called</pre></blockquote>
  
  <p>This looks strange to me.<br>
  I am unable to understand whats the difference between both cases.<br>
  Can anybody figure out a solution to my problem ?</p>
  
  <p>Somehow following doesn't produce an error, and I don't understand why.</p>
  
  <pre><code>class Master(Thread):
      def set(self, dirlist):
          self.dirlist = dirlist
      def run(self):
          observers = {}
          for d in dirlist:
              observers[d] = Observer()
              observers[d].start()
          while True:
              time.sleep(3600)
  
  master_thread = Master()
  master_thread.set(dirlist)
  master_thread.start()
  </code></pre>