Oct-03-2018, 02:51 AM
i will have a dictionary of objects. each object will have some key that identifies it in the big dictionary. the objects are dictionaries, too (so it's a dictionary of dictionaries). when processing an object, there a many functions involved to which a reference to the object will be passed. i would like to also include the object's identity within the object itself. the big question i have is what key to store it under, given that each object could potentially have data items that could conflict with they key chosen to story its identity. the defaultdict is close but not the solution. it stores that default somewhere; it just uses it in a way that is incomparible with this problem. so i'm thinking i could store the identity as an attribute. would this be possible?