What does the Python error "name 'self' is not defined" mean?
<p>I can't figure out what's wrong with this <a href="http://ideone.com/wuXCV" rel="nofollow">very simple snippet</a>:</p>

<pre><code>class A(object):
        def printme(self):
                print "A"

        self.printme()

a = A()
</code></pre>

<blockquote>
  <p>Traceback (most recent call last):   File "prog.py", line 1, in
  
      class A(object):   File "prog.py", line 5, in A
      self.printme() NameError: name 'self' is not defined</p>
</blockquote>
