Is there any Python object inspector?



There is no single built-in or normal function that acts as a object inspector in Python. There are functions like type(), dir(), vars() or modules like inspect which can be used to find the attributes, properties and methods of any object under inspection.

There other functions like id(), getattr(), hasattr(), globals(), locals(), callable() that are useful in looking inside an object to know its attributes and methods.


Advertisements