Skip to main content

A hashable immutable dictionary

Project description

HashableDict

A hashable immutable dictionary for Python. It lets you store dictionaries in sets or as keys to other dictionaries.

Usage

from HashableDict import HashDict

alive_list  = [("Ada Lovelace", False),
               ("Douglas Adams", False),
               ("Sylvia Plath", False),
               ("Alan Turing", False),
               ("you and your dreams", True)]

alive_dict = HashDict(alive_list)

if alive_dict["you and your dreams"]:
    print("The dream is alive!")

dict_within_dict = {alive_dict: None}
print(dict_within_dict)

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

HashableDict-0.3.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

HashableDict-0.3.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

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