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.2.0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for hashable_list-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90cb878017adfb9a548ce7d02b0095211290f3bdf0d3970936b384db4879582a |
|
MD5 | dbb6c495a17924292794a2373c1f39aa |
|
BLAKE2b-256 | f950c34966207b3fc16b22da1ccb22f314600c0ff51aca34c601a02d5f55df6a |