It does not show me superclass's attributes:
>>> class A(object):
def a(self):
print a
b = 3
>>> a = A()
>>> dir(a)
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'a', 'b']
>>> list(a.__class__.__dict__)
['a', '__module__', 'b', '__dict__', '__weakref__', '__doc__']
__module__, __dict__, __weakref__, __doc__ seem to be attributes created for each class by default.
This list of default attributes differs for old style classes:
>>> class B:
pass
>>> list(B().__class__.__dict__)
['__module__', '__doc__']
obj.__class__.__dict__includes superclass attributes. - Bob Stein