Skip to main content

No project description provided

Project description

hash-dict

GitHub Build Status PyPI

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


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)

Uploaded Source

Built Distribution

hash_dict-0.0.2-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page