Skip to main content

A hashable list type in Python

Project description

Hashable list Python Library

A new class that allows you to create a HashtableList object that repeats the functionality of the built-in list type, but is hashed.

Due to this, objects of the HashtableList class can be used as a key in dict and a member in set.

Example

>> import HashableList

>> hashable_list  =  HashableList([1, 2, 3])
>> dictionary  = {hashable_list: "value"}  
>> dictionary
{[1, 2, 3]: "value"}

>> id(hashable_list)
4429867792
>> hashable_list.append(4)
>> id(hashable_list)
4429867792  # this is the same object after append

>> dictionary
{[1, 2, 3, 4]: "value"}

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_list-0.2.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

hashable_list-0.2.0-py3-none-any.whl (4.2 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