[Python-ideas] iter() on steroids

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 14 04:05:09 CEST 2007

Erez Sh. wrote:
> The claim that iterators aren't "being used often enough to justify your 
> change" is very disturbing 

The claim wasn't that iterators are used infrequently,
but the functions in the itertools module.

The vast majority of the time, the only thing people
do with iterators is iterate over them.

> considering that in future pythons most 
> default functions will return iterators if possible (such as 
> key()/items()/values() of dict).

This is wrong -- they won't return iterators, they'll
return *views* that can be indexed and otherwise used
as sequences or mappings. So this has nothing to do
with the proposal at hand.


More information about the Python-ideas mailing list