title: What's the biggest difference between dir() and __dict__ in Python
body: <pre><code>class C(object):
      def f(self):
          print self.__dict__
          print dir(self)
  c = C()
  c.f()
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>{}
  
  ['__class__', '__delattr__','f',....]
  </code></pre>
  
  <p>why there is not a 'f' in self.__dict__ </p>