[issue23986] Inaccuracy about "in" keyword for list and tuple

2016-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset aba647a34ed4 by Raymond Hettinger in branch '2.7': Issue #23986: Note that the in-operator for lists and tuples check identity before equality. https://hg.python.org/cpython/rev/aba647a34ed4 -- nosy: +python-dev __

[issue23986] Inaccuracy about "in" keyword for list and tuple

2016-04-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue23986] Inaccuracy about "in" keyword for list and tuple

2015-04-17 Thread wim glenn
New submission from wim glenn: The comparisons section of the python 2 docs says: --- https://docs.python.org/2/reference/expressions.html#comparisons For the list and tuple types, x in y is true if and only if there exists an index i such that x == y[i] is true. --- But it's not strictly

[issue23986] Inaccuracy about "in" keyword for list and tuple

2015-04-17 Thread James Edwards
James Edwards added the comment: What about: For the list and tuple types, ``x in y`` is true if and only if there exists an -index *i* such that ``x == y[i]`` is true. +index *i* such that either ``x == y[i]`` or ``x is y[i]`` is true. Seems to address your issue, and match the semantics of t

[issue23986] Inaccuracy about "in" keyword for list and tuple

2015-04-17 Thread R. David Murray
R. David Murray added the comment: Those two should be in the reverse order, though. Identity is checked before equality. But why not backport the python3 wording? (Note that there is an open issue for slightly improving that wording). -- nosy: +r.david.murray _

[issue23986] Inaccuracy about "in" keyword for list and tuple

2015-04-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll add James' suggested wording, but with the reversed-order suggested by David Murray. -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker __

[issue23986] Inaccuracy about "in" keyword for list and tuple

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma