Diff lists
Project description
Overview
========
Diff 2 python lists using a given key
Usage
=====
.. code:: python
listA = [3, 2, 1]
listB = [5, 4, 3]
inA, inBoth, inB = DiffUnsortedLists(iterA=iter(listA), iterB=iter(listB), keyA=lamba x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
listA = [1, 2, 3]
listB = [3, 4, 5]
resultB = DiffListsByKey(iterA=iter(listA), iterB=iter(listB), keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
========
Diff 2 python lists using a given key
Usage
=====
.. code:: python
listA = [3, 2, 1]
listB = [5, 4, 3]
inA, inBoth, inB = DiffUnsortedLists(iterA=iter(listA), iterB=iter(listB), keyA=lamba x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
listA = [1, 2, 3]
listB = [3, 4, 5]
resultB = DiffListsByKey(iterA=iter(listA), iterB=iter(listB), keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
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
listdiff-0.1.tar.gz
(2.0 kB
view details)
Built Distribution
File details
Details for the file listdiff-0.1.tar.gz
.
File metadata
- Download URL: listdiff-0.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a490cfbe135a5323754b2940b482571cec010d1032bca2e92ebf07a7e71c9f29 |
|
MD5 | 72988f748c52c3146cb329969b01e0a1 |
|
BLAKE2b-256 | d3cf009bcbc95eaead03e2638fe412128cfadcbc9ac1d38ea5eb7f7fd7eaad51 |
File details
Details for the file listdiff-0.1-py3-none-any.whl
.
File metadata
- Download URL: listdiff-0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08d4c009a2d61ccf840703578b703e82ebd819e13118991620db6840582a137f |
|
MD5 | f38bb799f2cac9b85a3731da15d5121a |
|
BLAKE2b-256 | 21a52836ee241cb7c62eed8e70899e1cac9a4145a51f9aa6d78a45c17fc92b15 |