最佳答案
                                        
                                                                        
                                class C(object):
def f(self):
print self.__dict__
print dir(self)
c = C()
c.f()
output:
{}
['__class__', '__delattr__','f',....]
why there is not a 'f' in self.__dict__
 
                                
                             
                                
                            