Skip to main content

Myers diff of two lists or files

Inspired by https://gist.github.com/adamnew123456/37923cf53f51d6b9af32a539cdfa7cc4

API

myers.diff(a, b, context=None, format=None)

(myers.py, 25-60)

Return the Myers diff of two lists.

The result is a list of (action, line) pairs, where action is one of KEEP, INSERT, REMOVE, or OMIT (which happen to be the characters k, i, r, and o).

ARGUMENTS:
a, b:

The two files to compare

context:

How many lines of context to keep between blocks of changes? None, the default, means keep all unchanged lines. 0 means throw away all the unchanged lines.

format:

If a dictionary, it is used to format each diff entry. If true, the default dictionary above is used to format the diff entries. Otherwise they are returned as-is.

(automatically generated by doks on 2020-11-07T12:19:33.047064)

Metadata

Release files for myers 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for myers 1.0.1
File Size Uploaded
myers-1.0.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for myers 1.0.1
File Interpreter ABI Platform
myers-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / myers-1.0.1.tar.gz

Download URL myers-1.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4f9d7681c04e1fd0c61e840e26e22b1bd4d5031887c7d5fb43dccc76e64423a3
BLAKE2b-256 checksum
How to use checksums
ac4949cb1d292dbce2999d7c812750f739e71fee2df845cf9852561ff64db5b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.6

Release files / myers-1.0.1-py3-none-any.whl

Download URL myers-1.0.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2949aff5b7b2c03e6a483bfd109574916e5d9cb339afcfe3d43e1135b2f70aec
BLAKE2b-256 checksum
How to use checksums
d7b6d49eba93199c9538d6e4ffa20cf399874a7a5855331990262752fedb8058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.6

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page