⬅︎ Back to Fastest way to uniqify a list in Python
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.
Because that makes it possible to optionally override what the key should be. Some items aren't hashable. E.g. dicts.
Comment
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
Because that makes it possible to optionally override what the key should be. Some items aren't hashable. E.g. dicts.