[Python-ideas] __iter__ implies __contains__?

Guido van Rossum guido at python.org
Sun Oct 2 22:25:46 CEST 2011


On Sun, Oct 2, 2011 at 12:57 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Hello?
> The issue is not that walking over an iterator changes the state of the
> iterator, it is that "x in A" iterates over A at all.

Hello?
That is the original definition of "in".

-- 
--Guido van Rossum (python.org/~guido)



More information about the Python-ideas mailing list