[New-bugs-announce] [issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc

Xiang Zhang report at bugs.python.org
Tue May 3 02:19:16 EDT 2016


New submission from Xiang Zhang:

__contains__ operation in ItemsView, ValuesView and Sequence in collections.abc simply test equality with ==. This introduces inconsistent behaviour with built-in containers when encountering objects like NaN, which does not equal to itself. I asked something about this on core-mentorship, see https://mail.python.org/mailman/private/core-mentorship/2016-April/003543.html.

----------
components: Library (Lib)
messages: 264688
nosy: xiang.zhang
priority: normal
severity: normal
status: open
title: Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc
versions: Python 3.6

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


More information about the New-bugs-announce mailing list