[Python-ideas] Identity dicts and sets

Serhiy Storchaka storchaka at gmail.com
Thu Jan 3 12:51:04 CET 2013


On 03.01.13 00:48, Terry Reedy wrote:
> What do you mean by ordinal dict, as opposed to plain dict.

Sorry to have confused you. I mean "ordinary dict", same as "plain dict".

> I don't know anything about pickling or __sizeof__, by if one uses
> user-defined classes for nodes and edges, equality is identity, so I
> don't see what would be gained.

If one uses a list, a dict, or user-defined class with defined __eq__, 
equality is not identity. Yes, you can use an identity dict with mutable 
types!





More information about the Python-ideas mailing list