Python decorator to automatically generate repr strings
Project description
easyrepr
Python decorator to automatically generate repr strings
Example
>>> class UseEasyRepr:
... def __init__(self, foo, bar):
... self.foo = foo
... self.bar = bar
... @easyrepr
... def __repr__(self):
... ...
...
>>> x = UseEasyRepr(1, 2)
>>> repr(x)
'UseEasyRepr(foo=1, bar=2)'
Installation
$ pip install easyrepr
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easyrepr-0.3.1.tar.gz
(5.0 kB
view hashes)