Skip to main content

Dicts and Sets that hash items based on identity instead of value

Project description

Introduction

This module implements dicts and sets that compare items based on identity rather than value. This allows them to store unhashable objects.

Usage example:

from identity_containers import IdentitySet

foo = []
bar = []

id_set = IdentitySet([foo])

print(foo in id_set)  # True
print(bar in id_set)  # False

The following classes exist:

  • IdentitySet
  • IdentityDict
  • IdentityDefaultDict

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

identity_containers-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

identity_containers-1.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file identity_containers-1.0.0.tar.gz.

File metadata

  • Download URL: identity_containers-1.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for identity_containers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fa55b3788c7b57807d116d1224d7a43dc04800d9e7409e9bf97b7bc9457a189a
MD5 42729d449570d1a84881d0c817b5f7af
BLAKE2b-256 33e6242876001bc77fcc948cd78cae3d30c31611712c0ce4dc8d7cdf05687346

See more details on using hashes here.

File details

Details for the file identity_containers-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for identity_containers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daa30ea2aea21975e91991b11aa1e55efeedb885ce42ccff0a30e4d4d529b4bd
MD5 a66624e4fc82e7b1576ff0e1b6eb51dd
BLAKE2b-256 0892fb5a1ecdcb9ca570ade022f6f276886ddbc09b8fac8b7535f3a76be25f08

See more details on using hashes here.

Supported by

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