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.2.tar.gz (4.0 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.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for identity_containers-1.0.2.tar.gz
Algorithm Hash digest
SHA256 da64fa2e9abcfd1a0757abf646c1d82d8c7c7268214fb9facedf2280afc8269e
MD5 bfcaca55e121b1f37bd6f745db2143e0
BLAKE2b-256 bcbf86c73220d9e42b69711331542aa356932368156c19d420dcd7e755217958

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for identity_containers-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ebf462b657dd26358470b8bb08c5fcd23e9780cfd0a3c1b5230c6da1c59126f4
MD5 a64d0baad0083bfccee15ef896d9e3b8
BLAKE2b-256 e3c154f947c51d1829eca0b8029531c5af0da9f47522295c93d71daf1b94ac46

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