title: Different ways of using __init__ for PyQt4
body: <p>So... I'm working on trying to move from basic Python to some GUI programming, using PyQt4. I'm looking at a couple different books and tutorials, and they each seem to have a slightly different way of kicking off the class definition.  </p>
  
  <p>One tutorial starts off the classes like so:  </p>
  
  <pre><code>class Example(QtGui.QDialog):
      def __init__(self):
          super(Example, self).__init__()
  </code></pre>
  
  <p>Another book does it like this:</p>
  
  <pre><code>class Example(QtGui.QDialog):
      def __init__(self, parent=None):
          super(Example, self).__init__(parent)
  </code></pre>
  
  <p>And yet another does it this way:</p>
  
  <pre><code>class Example(QtGui.QDialog):
      def__init__(self, parent=None):
          QtGui.QWidget.__init__(self, parent)
  </code></pre>
  
  <p>I'm still trying to wrap my mind around classes and OOP and <code>super()</code> and all... am I correct in thinking that the last line of the third example accomplishes more or less the same thing as the calls using <code>super()</code> in the previous ones, by explicitly calling the base class directly?  For relatively simple examples such as these, i.e. single inheritance, is there any real benefit or reason to use one way vs. the other?  Finally... the second example passes <code>parent</code> as an argument to <code>super()</code> while the first does not... any guesses/explanations as to why/when/where that would be appropriate?</p>