No project description provided
Project description
hash-dict
Allow python dict/set redefine hash and equals operations like csharp.
You are able to create your own comparers.
Usage
For example, for str ignore case:
from hash_dict import HashDict, StringComparers
data = HashDict(StringComparers.IgnoreCaseComparer)
data['a'] = 1
assert list(data) == ['a']
assert data['a'] == 1
assert data['A'] == 1
Unhashable
How about some strange unhashable object?
You can use AnyComparer
to handle it 👍.
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
hash_dict-0.0.2.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for hash_dict-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4604b109d5b185e0e26e0435502708315fbe8b41b5a34c79d97367e2297e512 |
|
MD5 | 7b24f599ac2eba05c95b8a555789dc5e |
|
BLAKE2b-256 | 4fb8995478737f1c24fb454831969c50192b996cac43114fff7a803e8dd8b0ed |