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.1.tar.gz (3.9 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.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for identity_containers-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d940949f634a244e8e3fe78221b686f59589bd61c8be7e4275acc0ff3b54bf3e
MD5 c46687805fe5e8d2b9763a81bf6fc342
BLAKE2b-256 b69a834393e643b77b4e32798d8456906b9d1f920b2ba0788e2c6e2c7193f273

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for identity_containers-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4bd1a30e0d76ea5e7ebd4e8450b0ab6717b937fe7f628ed0b373fcdc02556fd
MD5 334ed55abcb84dab466341a16bbdc913
BLAKE2b-256 5c90eed7d92ffd58d8ea4071120c6ba1405aa366d37b21b1488d3776d2d299e2

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