inspect.getmembers(object[, predicate]) Return all the members of an object in a list of (name, value) pairs sorted by nam
inspect.getmembers(object[, predicate])
Return all the members of an object in a list of (name, value) pairs sorted by nam
(name, value)
In reference to Ned Batchelder's answer above, in Python 3 line numbers of a method m can be gotten with m.__func__.__code__.co_firstlineno
m.__func__.__code__.co_firstlineno
inspect — Inspect live objects