title: Reference instance method outside class definition
body: <p>I'm trying to pass a method as an argument outside of the definition of a class. However, since it's not defined in that scope, it doesn't work. Here's what I'd like to do:</p>
  
  <pre><code>def applyMethod(obj, method):
      obj.method()
  
  class MyClass():
      def myMethod(self):
          print 1
  
  a = MyClass()    
  
  #works as expected
  a.myMethod()
  
  #"NameError: name 'myMethod' is not defined"
  applyMethod(a, myMethod)
  </code></pre>