title: Passing a class instance method to another function in Python (2.7)
body: <p>sorry if the title does not make sense, I am relatively new to this. This is my code: </p>
  
  <pre><code>class MeanFlow:
      def __init__(self, V0=1):
          self.V0 = V0
      def LHS(self, t, y):
          return y[0]*self.V0
  
  
  def velocity_field(w,f):
      z = 0 # dummy 
      u = f(z,w).real
      v = -1*f(z,w).imag 
      return u, v
  
  w0 = 1
  mean = MeanFlow()
  dwdz = mean.LHS
  print(velocity_field(w0, dwdz))
  </code></pre>
  
  <p>But I get the error <code>TypeError: 'int' object has no attribute '__getitem__'</code> </p>
  
  <p>My question is how do I pass this function which is a method of my class instance into another function. If I define the function outside the class and pass it to another function this works but is not what I want. Thanks!</p>
  
  <p><strong>Edit:</strong> The typo <code>return = y[0]*self.V0</code> has been corrected.</p>