Compute the Myers diff of two lists
Project description
Inspired by https://gist.github.com/adamnew123456/37923cf53f51d6b9af32a539cdfa7cc4
API
myers.diff(a, b, context=None, format=None)
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)
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
Built Distribution
File details
Details for the file myers-1.0.1.tar.gz
.
File metadata
- Download URL: myers-1.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f9d7681c04e1fd0c61e840e26e22b1bd4d5031887c7d5fb43dccc76e64423a3 |
|
MD5 | 889f014cc88bffce74c260e57360e47b |
|
BLAKE2b-256 | ac4949cb1d292dbce2999d7c812750f739e71fee2df845cf9852561ff64db5b8 |
File details
Details for the file myers-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: myers-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2949aff5b7b2c03e6a483bfd109574916e5d9cb339afcfe3d43e1135b2f70aec |
|
MD5 | 76684d9234e8289784569fbf7865465a |
|
BLAKE2b-256 | d7b6d49eba93199c9538d6e4ffa20cf399874a7a5855331990262752fedb8058 |