• Kevin Modzelewski's avatar
    dicts check by identity in addition to equality · d1f7e31b
    Kevin Modzelewski authored
    This isn't just a performance optimization, but is actually important
    since people put things in dicts that don't __eq__ themselves.
    The common example (and test here) is NaN, but in particular sqlalchemy
    does this with clauses (where __eq__ returns a new sql clause).
    
    Also, handle cases that __eq__ returns non-bool
    d1f7e31b
dict_internals.py 908 Bytes