Suppose we have the following class hierarchy:
class ClassA:
@property
def foo(self): return \"hello\"
class ClassB(ClassA):
@property
def
You should use python's inspect
module for any such introspective capabilities.
.
.
>>> class ClassC(ClassB):
... def baz(self):
... return "hiya"
...
>>> import inspect
>>> for attr in inspect.getmembers(ClassC):
... print attr
...
('__doc__', None)
('__module__', '__main__')
('bar', )
('baz', )
('foo', )
Read more about the inspect
module here.