You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

HashableDict

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

HashableDict

A hashable immutable dictionary

0.3.0
pipPyPI
Maintainers
1

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)

Keywords

dictionary

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts