Python > Inspect an object


print dir(<my object>)

where <my object> is your object name.


dirreturns the list of names in the current local scope.


vars returns the __dict__attribute for a module, class or instance.


__dict__ is a dictionary or other mapping object used to store an object’s writable attributes.


Leave a Reply

Your email address will not be published. Required fields are marked *