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
Release history Release notifications | RSS feed
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.1.0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for hashable_list-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 534fe3c509fca074154c066bcee4c136eeb8546d8dd9cf6caf70b759d5a88a1f |
|
MD5 | 9f91977aab4321fbb376177b658d9e57 |
|
BLAKE2b-256 | 3db701ca9d1946f5d6a0b9c9dcf29df943a77a06b3647a965d486e0a70b3279b |