Last active
April 25, 2017 17:25
-
-
Save jorotenev/3f6572660c4203d6a1cb4b66b7563ebc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_object_attrs(obj): | |
print("%s:" % obj.__name__) | |
for name, value in [(v, getattr(obj, v)) for v in obj.__dict__ if not v.startswith('__')]: | |
print("%s=%s" % (name, value)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment