title: Python NameError when defining class
body: <p>The below Python fails for some reason.</p>
  
  <pre><code>class NetVend:
      def blankCallback(data):
          pass
  
      def sendCommand(command, callback=NetVend.blankCallback):
          return NetVend.sendSignedCommand(command, NetVend.signCommand(command), callback)
  
      def sendSignedCommand(command, signature, callback):
          pass
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "module.py", line 1, in &lt;module&gt;
      class NetVend:
    File "module.py", line 5, in NetVend
      def sendCommand(command, callback=NetVend.blankCallback):
  NameError: name 'NetVend' is not defined
  </code></pre>