Skip to content

Instantly share code, notes, and snippets.

@leonjza
Last active September 22, 2022 18:36
Show Gist options
  • Save leonjza/9a1dd476806589dd7ff3 to your computer and use it in GitHub Desktop.
Save leonjza/9a1dd476806589dd7ff3 to your computer and use it in GitHub Desktop.
Lame Python Object Dumper
def dump(obj, name = None):
for attr in dir(obj):
if hasattr(obj, attr):
print(" * %s.%s = %s" % ('obj' if name is None else name, attr, getattr(obj, attr)))
def noValDump(obj, name = None):
for attr in dir(obj):
if hasattr(obj, attr):
print(" * %s.%s" % ('obj' if name is None else name, attr))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment