title: instance methods and static methods in python classes
body: <p>So in python's docutils package there is a class (Image) that has a method (align). As I understood it methods take self as a first argument unless they are decorated as @classmethod or @staticmethod, however align doesn't. The relevant code is copied below (<a href="http://docutils.sourceforge.net/docutils/parsers/rst/directives/images.py" rel="nofollow noreferrer">full code here</a>).</p>
  
  <pre><code>class Image(Directive):
  
      def align(argument):
          # This is not callable as self.align.  We cannot make it a
          # staticmethod because we're saving an unbound method in
          # option_spec below.
          return directives.choice(argument, Image.align_values)
  </code></pre>
  
  <p>I'm using this code as a base for my own purposes, and I have tried both giving align a self argument and turning it into a static method (after changing the name so as not to conflict with self.align), but got errors with either approach. What is going on?</p>