return NotImplemented from Mapping when comparing to a non-mapping #8729
diff --git a/Lib/_abcoll.py b/Lib/_abcoll.py
index 326c1f9..ad5a9c0 100644
--- a/Lib/_abcoll.py
+++ b/Lib/_abcoll.py
@@ -369,8 +369,9 @@
     __hash__ = None
 
     def __eq__(self, other):
-        return isinstance(other, Mapping) and \
-               dict(self.items()) == dict(other.items())
+        if not isinstance(other, Mapping):
+            return NotImplemented
+        return dict(self.items()) == dict(other.items())
 
     def __ne__(self, other):
         return not (self == other)