[New-bugs-announce] [issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

Daniel Stutzbach report at bugs.python.org
Sun May 16 00:08:12 CEST 2010


New submission from Daniel Stutzbach <daniel at stutzbachenterprises.com>:

The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping, to give the other type a chance at the comparison.  Right now it simply returns false.

The comparison methods on the other ABCs in _abcoll.py already return NotImplemented if they don't recognize the other type.

----------
components: Library (Lib)
files: mapping.patch
keywords: patch
messages: 105833
nosy: stutzbach
priority: normal
severity: normal
stage: patch review
status: open
title: The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file17355/mapping.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8729>
_______________________________________


More information about the New-bugs-announce mailing list