On Wed, Jul 9, 2014 at 4:43 PM, Steven D'Aprano <st...@pearwood.info> wrote: > I don't understand this. You've just shown an example from Python 2 where > 'in' uses 'is'. How is that a Python 3 change?
A docs change. https://docs.python.org/2/reference/expressions.html#not-in """ 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. """ https://docs.python.org/3/reference/expressions.html#not-in """ For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y). """ So the definition of the operator (as stated in the docs) has changed to match its behaviour. That's definitely a change; the Py2 behaviour is buggy according to its docs. Should the Py2 docs be updated to match the Py3 docs, or should it be left as a minor technical distinction that almost never is important? ChrisA -- https://mail.python.org/mailman/listinfo/python-list