In most cases, using __dict__
or dir()
will get you the info you're wanting. If you should happen to need more details, the standard library includes the inspect module, which allows you to get some impressive amount of detail. Some of the real nuggests of info include:
If you're just looking for "what attribute values does my object have?", then dir()
and __dict__
are probably sufficient. If you're really looking to dig into the current state of arbitrary objects (keeping in mind that in python almost everything is an object), then inspect
is worthy of consideration.