Comment

Harsh

Peter - nasgar's merely replacing your identity function plug with an inline lambda in the function def. I think that is valid to do (achieves the same thing), but does look harder to read.

Parent comment

Peter Bengtsson

Because that makes it possible to optionally override what the key should be. Some items aren't hashable. E.g. dicts.