I have a class ID_card of nickname, measure, and pub_key.
I have a storage, containing objects of ID_card.
Applications will search ID_card objects either via nickname, measure, or pub_key.
pub_key is a unique property. Hence, if storage=dict() then storage[pub_key] = object is a suitable key-value design.
If we suppose for simplicity that nickname and measure are also unique then is there maybe some python built-in type for storage such that all the following work:
- storage[pub_key] = object
- storage[nickname] = object
- storage[measure] = object
Ideally, for 2,3 the access to storage returns a list of all objects satisfying the nickname/measure.