Skip to main content

You diff objects, you find out why they ain't the same.

Project description

diff defines a difference protocol. Watch:

>>> class LonelyObject(object):
...     def __diff__(self, other):
...         return "{} is not like {}".format(self, other)
...     def __repr__(self):
...         return "<LonelyObject>"

>>> from diff import diff
>>> diff(LonelyObject(), 12).explain()
'<LonelyObject> is not like 12'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
diff-0.4.1-py2-none-any.whl (5.2 kB) Copy SHA256 hash SHA256 Wheel 2.7
diff-0.4.1.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page