Skip to main content

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


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)

Uploaded Source

Built Distribution

screwhashesset-0.10-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page