map vs. list-comprehension

George Sakkis gsakkis at rutgers.edu
Wed Jun 29 15:14:51 CEST 2005


"Carl Banks" <invalidemail at aerojockey.com> wrote in message

> Fear not, people: just as the BDFL does not indiscriminately add
> features, also he does not indiscriminately remove them.  zip, though
> it feels a little exotic, is very useful and serves a purpose that no
> language feature serves(*), so rest assured it's not going to
> disappear.
>
> (*) Excepting izip, of course, which is more useful than zip and
> probably should also be a builtin.

One of the envisioned changes in Python 3000
(http://www.python.org/peps/pep-3000.html) is to return iterators
instead of lists in several contexts (e.g. dict.keys(), dict.items()),
so perhaps zip will stand for what itertools.izip is today.

George




More information about the Python-list mailing list