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


Release history Release notifications

This version
History Node

0.4.1

History Node

0.4.0

History Node

0.3.1

History Node

0.2.0

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 Sep 11, 2017
diff-0.4.1.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None Sep 11, 2017

Supported by

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