Skip to content

Instantly share code, notes, and snippets.

@esebastian
Last active January 1, 2016 16:09
Show Gist options
  • Save esebastian/8168930 to your computer and use it in GitHub Desktop.
Save esebastian/8168930 to your computer and use it in GitHub Desktop.
Dump the state of a Python object
'from http://stackoverflow.com/a/192184/1663589
def dump(obj):
for attr in dir(obj):
print "obj.%s = %s" % (attr, getattr(obj, attr))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment