1 2 3 4
class C(object): def f(x): return x print C.__dict__
1
{'__dict__': <attribute '__dict__' of 'C' objects>, '__module__': '__main__', '__weakref__': <attribute '__weakref__' of 'C' objects>, '__doc__': None, 'f': <function f at 0x40345a3c>}