When inheriting from a type that defines an __eq__ operation, that __eq__ will override the built-in __eq__. In the case of the MutableMapping type, that means that it will try to use element-wise comparison against any other mapping type. This is effectively an attractive nuisance. Instead, we explicitly use the default comparison, which is based on object identity rather than contents or anything.
When inheriting from a type that defines an
__eq__
operation, that__eq__
will override the built-in__eq__
. In the case of theMutableMapping
type, that means that it will try to use element-wise comparison against any other mapping type. This is effectively an attractive nuisance. Instead, we explicitly use the default comparison, which is based on object identity rather than contents or anything.