title: What is special about __func__() functions in python 2.7
body: <p>in Python 2.7 one can created private members of a class by preceding them with '__'</p>
  
  <pre><code>     &gt;&gt;&gt; class Test:
      def __f():
          print 'hi'
  
  
  &gt;&gt;&gt; ob=Test()
  &gt;&gt;&gt; ob.__f()
  
  Traceback (most recent call last):
    File "&lt;pyshell#20&gt;", line 1, in &lt;module&gt;
      ob.__f()
  AttributeError: Test instance has no attribute '__f'
  </code></pre>
  
  <p>In python one can define a function like <code>f__(x)</code> also. Then why isn't a function defined as </p>
  
  <pre><code>__f__(x)
  </code></pre>
  
  <p>not treated private?</p>
  
  <pre><code>&gt;&gt;&gt; class Test2:
      def __f__(self):
          print 'hi'
  
  
  &gt;&gt;&gt; ob2=Test2()
  &gt;&gt;&gt; ob2.__f__()
  hi
  </code></pre>
  
  <p>So how exactly are <code>__f__()</code> different from f()?</p>