Determining the class of a method
<p>Let's say I have:</p>

<pre><code>class User():
  def method(self):
    pass

u=User()
</code></pre>

<p>How do I extract the class from <code>u.method</code> through the <code>access</code> decorator?  All I get from <code>u.method</code> is that it is a function... but I'd like to know from which <code>class</code>.</p>

<p>I am interested in a python 2.7 solution.</p>

<p><strong>Update</strong>: I forget to mention I didn't give enough details:</p>

<pre><code>class access():
    """
    Decorator for specifying which 'access right' must be enforced 
    at the object method level  
    """

    def __init__(self, right):
        self.right=right

    def __call__(self, method):
      ### need to grab the method's class name here
</code></pre>

<p>I am actually using a decorator:</p>

<pre><code>class User():
  @access("edit"
  def method(self):
    pass
</code></pre>
