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 details)
Built Distribution
File details
Details for the file hashable_list-0.2.0.tar.gz
.
File metadata
- Download URL: hashable_list-0.2.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 111b6b7b43826379924a28feb8038aa3e1120788d66b263dfb846b333cce3d55 |
|
MD5 | b9c5dd35a641d5ce9988d2b4fe070fe3 |
|
BLAKE2b-256 | 8643022932004ae4feb0f800683899530e41de35ce31bc570333a63cec145e3e |
File details
Details for the file hashable_list-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: hashable_list-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90cb878017adfb9a548ce7d02b0095211290f3bdf0d3970936b384db4879582a |
|
MD5 | dbb6c495a17924292794a2373c1f39aa |
|
BLAKE2b-256 | f950c34966207b3fc16b22da1ccb22f314600c0ff51aca34c601a02d5f55df6a |