[Python-ideas] iter() on steroids
brett at python.org
Sat Apr 14 00:45:54 CEST 2007
On 4/13/07, Josiah Carlson <jcarlson at uci.edu> wrote:
> "George Sakkis" <gsakkis at rutgers.edu> wrote:
> > On 4/13/07, Terry Reedy <tjreedy at udel.edu> wrote:
> > > I personally think there are too many builtins.
> > I agree, that's why I don't suggest a new builtin but adding features
> > to an existing one. In fact, this can even *reduce* the builtins since
> > map(), zip() and enumerate() could be removed from the builtin
> > namespace.
> Map was already going to be removed because it can be replaced by...
> [f(x) for x in y]
> Filter was already going to be removed because it can be replaced by...
> [x for x in y if f(x)]
> I can't remember if anything was going to happen to zip or any of the
> other functional programming functions.
zip is staying but replaced underneath the covers with itertools.izip.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas