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 details)
Built Distribution
File details
Details for the file hash_dict-0.0.2.tar.gz
.
File metadata
- Download URL: hash_dict-0.0.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9457f283fef6db5b09819ae98dadeaf7ce71180023a848357dc30ddbd0709ffd |
|
MD5 | 8f326a75f4519f7057331f1806c18aa5 |
|
BLAKE2b-256 | 626d3a477ce056c587c59e012b157f887f214ffe8135ab216774d101bcb36bce |
File details
Details for the file hash_dict-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: hash_dict-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4604b109d5b185e0e26e0435502708315fbe8b41b5a34c79d97367e2297e512 |
|
MD5 | 7b24f599ac2eba05c95b8a555789dc5e |
|
BLAKE2b-256 | 4fb8995478737f1c24fb454831969c50192b996cac43114fff7a803e8dd8b0ed |