Is there a way to get all attributes/methods/fields/etc. of an object in Python?
vars() is close to what I want, but it doesn't work unless an object has a __dict__, which isn't always true (e.g. it's not true for a list, a dict, etc.).
How do I find out a name of class that created an instance of an object in Python if the function I am doing this from is the base class of which the class of the instance has been derived?
…
So what I'm looking for here is something like PHP's print_r function.
This is so I can debug my scripts by seeing what's the state of the object in question.
Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?
Or,
if this is not possible, is there at least an easy way to check if it …