[Python-3000] Builtin iterator type

Josiah Carlson jcarlson at uci.edu
Tue Nov 14 09:09:31 CET 2006


"George Sakkis" <george.sakkis at gmail.com> wrote:
> The original motivation is to provide syntax sugar (+, *, indexing,
> slicing) to iterators, which you can't do with functions. The rest
> methods that would be spelled out with their current itertools names
> is a fortunate side-effect, not the primary motivation.

I've never needed (the equivalent of) +, *, indexing, or slicing on
arbitrary iterators (I make them iterators so that I can iterate over
them), so I don't see the need to make the current object more
cumbersome than necessary.

For those who would like the equivalent of +, *, indexing, or slicing
arbitrary iterators, there is the itertools module.  -1

 - Josiah



More information about the Python-3000 mailing list