[Python-iterators] While we're at it...

Aahz Maruch aahz at panix.com
Fri Jun 29 22:04:03 EDT 2001


In article <slrn9jq0uq.47o.quinn at regurgitate.ugcs.caltech.edu>,
Quinn Dunkan <quinn at regurgitate.ugcs.caltech.edu> wrote:
>
>Of course, an iterator map would be useful:
>
>def iter_map(f, seq):
>    for o in seq:
>        yield f(o)

This is a generator, not just an iterator.
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista   

"Nothing fails like prayer"  --bumper snicker



More information about the Python-list mailing list