Skip to main content

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
  • IdentityWeakKeyDict

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.1.0.tar.gz (4.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.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for identity_containers-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8e7c5aabfa4f46409e88bb0dd598a43d3ee8e268864cd7ae735f86b15043be62
MD5 e538c5992745eb79a7c4a2b480b18b53
BLAKE2b-256 dfd4a00dc75b7198b37a015f1c332bd7788db6b3f6555f64d22d4e12c54ad9ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for identity_containers-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9af2208e10224cf41be4d136e765fbb1b561d78f4f58b520743cedd31f45d4f0
MD5 b611bf55822d95bac3d92f322d71a748
BLAKE2b-256 88323cad0e57b58a35f6fb275a105fe8fd8c0b510d848bbf87c40b76a8ddee44

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

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