A set that handles all kinds of objects (hashable or not) and preserves the order of the elements
Project description
A set that handles all kinds of objects (hashable or not) and preserves the order of the elements
pip install screwhashesset
Tested against Windows 10 / Python 3.10 / Anaconda
from screwhashesset import ScrewHashesSet
s1 = ScrewHashesSet([[(43, 5), 1, 2], 3, {3, 4, 5, 6}, {2: 3, 3: 5}, {2: 3, 3: 6}])
s2 = ScrewHashesSet([(2, 3), [1, 2], 3, 4, {3, 4, 5}, {2: 3, 3: 5}, {1: 32}])
print(s1 - s2)
print(s2 - s1)
print(s2 | s1)
print(s2 & s1)
# str(): {[(43, 5), 1, 2], {3, 4, 5, 6}, {2: 3, 3: 6}}
# repr(): ScrewHashesSet([[(43, 5), 1, 2], {3, 4, 5, 6}, {2: 3, 3: 6}])
# str(): {(2, 3), [1, 2], 4, {3, 4, 5}, {1: 32}}
# repr(): ScrewHashesSet([(2, 3), [1, 2], 4, {3, 4, 5}, {1: 32}])
# str(): {(2, 3), [1, 2], 3, 4, {3, 4, 5}, {2: 3, 3: 5}, {1: 32}, [(43, 5), 1, 2], {3, 4, 5, 6}, {2: 3, 3: 6}}
# repr(): ScrewHashesSet([(2, 3), [1, 2], 3, 4, {3, 4, 5}, {2: 3, 3: 5}, {1: 32}, [(43, 5), 1, 2], {3, 4, 5, 6}, {2: 3, 3: 6}])
# str(): {3, {2: 3, 3: 5}}
# repr(): ScrewHashesSet([3, {2: 3, 3: 5}])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
screwhashesset-0.10.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for screwhashesset-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e662384d262ce0dc9d27fc684f610f043bdd6c7b4203b7254d85b5bdc308582 |
|
MD5 | ba38d2073a80eb63de6ce3ec162b4235 |
|
BLAKE2b-256 | 2d4558527f5bf77c81639d7ff4508d0aca3c3745ad4686ac40eca9cdc60ba113 |