title: TypeError: Missing 1 required positional argument: 'self'
body: <p>I can't get past the error:</p>
  <pre class="lang-none prettyprint-override"><code>Traceback (most recent call last):
    File &quot;C:\Users\Dom\Desktop\test\test.py&quot;, line 7, in &lt;module&gt;
      p = Pump.getPumps()
  TypeError: getPumps() missing 1 required positional argument: 'self'
  </code></pre>
  <p>I examined several tutorials but there doesn't seem to be anything different from my code. The only thing I can think of is that Python 3.3 requires different syntax.</p>
  <pre><code>class Pump:
  
      def __init__(self):
          print(&quot;init&quot;) # never prints
  
      def getPumps(self):
          # Open database connection
          # some stuff here that never gets executed because of error
          pass  # dummy code
  
  p = Pump.getPumps()
  
  print(p)
  </code></pre>
  <p>If I understand correctly, <code>self</code> is passed to the constructor and methods automatically. What am I doing wrong here?</p>