Status of PEP's?
David Eppstein
eppstein at ics.uci.edu
Wed Feb 27 17:46:05 EST 2002
In article <ckmq7uo8l48cq9ig5qpgciu96gfc6sqb4r at 4ax.com>,
Gonçalo Rodrigues <op73418 at mail.telepac.pt> wrote:
> >> PEP 276: Iterator for ints.
> >> (I really love this one - as simple and "obvious" as it gets)
> >
> >I don't know an answer to your question, but in contrast to your opinion,
> >I really dislike this one. It gives a very nonintuitive meaning for
> >"x in y" when both are integers (equivalent to "x <= 0 < y"), and that
>
> Now you have me lost. As far as I understand the PEP only talks about
> providing an iterator for integers. It does not talk about supporting
> the in method for integers, which, as you state, would make up for a
> confusing syntax.
The "in" operation takes as arguments an object and an iterator.
If integers can be iterators, they can be second arguments to "in".
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list