1:1 mapping collection type
Project description
This is a python module that implements a 1:1 mapping type - similar to a dict, but as well as looking up values by keys (m[k] -> v), you can look up keys by values (m[v] -> k).
Given m = OneToOneMap(), the following constraints are always true:
m.get(key) == value
m.get(value) == key
m.keys() == set(m.keys())
m.values() == set(m.values())
set(m.keys()) & set(m.values()) == set()
set.(m.keys()).isdisjoint(set(m.values())) == True
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
onetoonemap-1.0.0.tar.gz
(2.0 kB
view details)
File details
Details for the file onetoonemap-1.0.0.tar.gz
.
File metadata
- Download URL: onetoonemap-1.0.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b739c574f9dffb927e5c21e9c9fe90a29f4b94103cd3d73cdf9c3cb286852b7 |
|
MD5 | e454d09098463904999e7078321f21d2 |
|
BLAKE2b-256 | 8e364cf8935d0509cebe035bb7cae81a9e9da509d80a663bdb386ce148c7394e |