Skip to content

Instantly share code, notes, and snippets.

@kezabelle
Last active December 24, 2015 21:49
Show Gist options
  • Save kezabelle/6868145 to your computer and use it in GitHub Desktop.
Save kezabelle/6868145 to your computer and use it in GitHub Desktop.
Is there a better way of constructing Python reprs than this? :|
class Hi(object):
def __repr__(self):
return '<{cls.__module__}.{cls.__name__} ... other stuff!>'.format(cls=self.__class__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment