Skip to content

anton2yakovlev/hashable-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Installing

pip install hashable-list

Example

>> from hashable_list 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"}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages