Skip to main content

Hashable dictionaries and lists, so that they can be used as keys in a dictionary

Project description

This library enables dictionaries and lists to be used as keys inside a dictionary. In other words, it makes them hashable. Instructions for use are provided at home page of project.

While mutable objects (lists, dictionaries) should not be made hashable in general, the programmer is trusted not to abuse this power. An extension option to explicitly make the resulting hashable object immutable is provided at the home page of this project for convenience.

There are certain use cases - e.g. when trying to pass seemingly identical keys to NetworkX as different nodes, or when you want to query an object’s properties in place while making a mapping instead of calling a complicated identification function - where these may be useful and reduce boilerplate code.

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

hashable_collections-1.0.zip (6.7 kB view hashes)

Uploaded Source

Built Distribution

hashable_collections-1.0-cp34-none-win32.whl (1.9 kB view hashes)

Uploaded CPython 3.4 Windows x86

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