[Python-ideas] iter() on steroids

Josiah Carlson jcarlson at uci.edu
Fri Apr 13 23:09:16 CEST 2007


"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.

 - Josiah




More information about the Python-ideas mailing list