title: Class methods in python: default kwargs from attributes of self
body: <p>Is it possible to define a class method which takes an attribute of <code>self</code> as a default keyword argument? i.e. I'd like to do something equivalent to the following:</p>
  
  <pre><code>class Foo:
      def __init__(self, bar):
          self.bar = bar
  
      def do_a_thing(self, my_arg=self.bar):
          do_something_else(my_arg)
  </code></pre>
  
  <p>Of course this throws an error:</p>
  
  <pre><code>x = Foo(y)
  x.do_a_thing()
  
  NameError: name 'self' is not defined
  </code></pre>
  
  <p>Hopefully it is clear what kind of behavior I am hoping to get. Calling <code>x.do_a_thing()</code> should be equivalent to <code>x.do_a_thing(my_arg=x.bar)</code>.</p>
  
  <p>Is there a way to do this?</p>