python - call instance method using __func__
<p>I am new to python, and I don't quite understand the <code>__func__</code> in python 2.7.</p>

<p>I know when I define a class like this:</p>

<pre><code>class Foo:
    def f(self, arg):
        print arg
</code></pre>

<p>I can use either <code>Foo().f('a')</code> or <code>Foo.f(Foo(), 'a')</code> to call this method. However, I can't call this method by <code>Foo.f(Foo, 'a')</code>.  But I accidently found that I can use <code>Foo.f.__func__(Foo, 'a')</code> or even <code>Foo.f.__func__(1, 'a')</code> to get the same result.  </p>

<p>I print out the values of <code>Foo.f</code>, <code>Foo().f</code> and <code>Foo.f.__func__</code>, and they are all different.  However, I have only one piece of code in definition. Who can help to explain how above code actually works, especially the <code>__func__</code>?  I get really confused now. </p>
