Failure to match a set element

Right. See also

An alternative is to use IdDict, which hashes based on object identity. A set is simply based on a dictionary whose values are nothing. (In fact, there is an undocumented Base.IdSet that implements this, but doesn’t cover the whole Set API.)

4 Likes