Ethan Furman added the comment:

So something like:

For container types such as list, tuple, or collections.deque, the expression 
'x in y' is equivalent to 'any(x is e or x == e for e in y)'.  For container 
types such as set, frozenset, and dict, this equivalence expression is modified 
by the addition of 'if hash(x) == hash(e)'.

?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23987>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to