How to access properties of Python super classes e.g. via __class__.__dict__?
问题 How can I get all property names of a python class including those properties inherited from super classes ? class A(object): def getX(self): return "X" x = property(getX) a = A() a.x 'X' class B(A): y = 10 b = B() b.x 'X' a.__class__.__dict__.items() [('__module__', '__main__'), ('getX', <function getX at 0xf05500>), ('__dict__', <attribute '__dict__' of 'A' objects>), ('x', <property object at 0x114bba8>), ('__weakref__', <attribute '__weakref__' of 'A' objects>), ('__doc__', None)] b._