Making string-formatting smarter by handling generators?
Paul Rubin
http
Wed Feb 27 20:25:11 EST 2008
Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> map() isn't deprecated, not even for Python 3 where it remains a built-
> in. However it will return an iterator instead of a list, making it
> (presumably) a more convenient way to spell itertools.imap().
That's the first I heard of that change. I guess it makes some
sense, however it is a bit weird, right now I use imap when I
want an iterator and use map when I explicitly want a list.
Maybe they can add something like "lmap" to return a list, as
an alternative to list(map( ... ))
More information about the Python-list
mailing list