Skip to main content

PyPI version Supported Python versions Build status pre-commit.ci status

diff defines a difference protocol. Watch:

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

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

Download files

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

Source Distribution

diff-2023.12.6.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diff-2023.12.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file diff-2023.12.6.tar.gz.

File metadata

  • Download URL: diff-2023.12.6.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for diff-2023.12.6.tar.gz
Algorithm Hash digest
SHA256 44d7370ad713f71dcab625189e0a0eec3027da8706f9ce885f55d5760351dd5d
MD5 7005de31613c1e2d3343df882f7c307b
BLAKE2b-256 a74266c5589a8489c306a8ccb7b52ee113dfb6cc4eb7075cc2dccb1a883a9b58

See more details on using hashes here.

File details

Details for the file diff-2023.12.6-py3-none-any.whl.

File metadata

  • Download URL: diff-2023.12.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for diff-2023.12.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7e61b2dbb25e6f509715b6f31c9d0bf059203f1c8e28aa758bc252f56754dd3d
MD5 aa8914151df9b630aa1c99ef81a7575d
BLAKE2b-256 60c62dac6e692cfaee7a133f7b40d6e09681360f95938c25904c370d2b17c1e8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2023.12.6 This release

2 files

2023.12.5

2 files

2023.12.4

2 files

2023.12.3

2 files

2023.12.2

2 files

2023.12.1

2 files

0.6.1

2 files

0.6.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page