New PEP (281): Loop Counter Iteration with range and xrange

Aahz Maruch aahz at
Thu Feb 28 21:45:30 CET 2002

In article <slrna6fu1v.goj.mlh at>,
Magnus Lie Hetland <mlh at> wrote:
>I've submitted a draft PEP describing the idea of letting range and
>xrange accept sequences (or possibly, for xrange, any iterable) and
>return/yield one index per element. It's closely related to PEP 212,
>but instead of proposing new functions/syntax, it proposes extending
>the capabilities of existing functions.

Have to say that I really don't like this suggestion as proposed.  IMO,
range() with a sequence should permit only one argument; at the very
least, if more than one argument is permitted, the second and third
arguments should be restricted to integers.
                      --- Aahz  <*>  (Copyright 2002 by aahz at

Hugs and backrubs -- I break Rule 6       
Androgynous poly kinky vanilla queer het Pythonista

"He's Quebecois. He puts mayonnaise on *everything*."  --siobhan at

More information about the Python-list mailing list