Skip to main content

HashedColls - hashed dict/list collections

Simple Usage

from hashedcolls import HashedDict
from hashedcolls import HashedList

d = HashedDict
l = HashedList

my = d({d({1: 1}): 1, l([1, 2, 3]): 2, (1,): 3})

How it works?

By default, dict and list Python 3 collections can not be used as a key for a dict, because they are mutable, thus are not hashable.
But both HashedDict and HashedList contain __hash__() method implemented.
How it works is that both of these classes have Hashed mixin included, so they are able to use Hashed.elements2hash() function, that basically returns __hash__() of all elements (items() in case of a dict).

Release files for hashedcolls 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for hashedcolls 1.1.1
File Interpreter ABI Platform
hashedcolls-1.1.1-py3-none-any.whl Python 3 none any Details

Release files / hashedcolls-1.1.1-py3-none-any.whl

Download URL hashedcolls-1.1.1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a0038ad158c30f18f8344aa3da7f9ce92349860fc1195d8c05063ba147a218e
BLAKE2b-256 checksum
How to use checksums
7948b0bc375bdbe9fe8896b950974f0dccc47c2dfa6deae66e150ff8ae3c9d71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page