The data structure should meet the following purpose:
- each object is unique with certain key-value pairs
- the keys and values are not predetermined and can contain any string value
- querying for objects should be fast
Example:
object_123({'stupid':True, 'foo':'bar', ...})structure.get({'stupid':True, 'foo':'bar', ...})should returnobject_123
Optimally this structure is implemented with the standard python data structures available through the standard library.
How would you implement this?
object_123get new keys or changed values or both?