On 3/25/07, Perry Greenfield <[EMAIL PROTECTED]> wrote:
>
> On Mar 24, 2007, at 2:52 PM, Bill Baxter wrote:
>
> > On 3/24/07, Steven H. Rogers <[EMAIL PROTECTED]> wrote:
> >> Anne Archibald wrote:
> >>>
> >>> P.S. reduce isn't even a numpy thing, it's one of python's
> >>> much-neglected lispy functions.
> >>>
> >>
> >> It looks like reduce(), map(), and filter() are going away for Python
> >> 3.0 since GvR believes that they are redundant and list
> >> comprehensions
> >> and generator expressions are more readable alternatives.  lambda
> >> was on
> >> the block as well, but will be retained.
> >
> > Are you sure reduce is on the chopping block?  The PEP for generator
> > expressions doesn't say anything about reduce becoming redundant.
>
> While it isn't in his slides for Pycon this year, I could have sworn
> he said he was getting rid of reduce  (but not lambda, nor map IIRC
> but not sure about the latter)

I could definitely see map and filter getting killed off, because
their functionality is almost 100% covered by list comprehensions.
    map(function, s1,s2,s3...)  ~== [function(x) for x in izip(s1,s2,s3...) ]
    filter(function, sequence) ~== [x for x in sequence if function(x)]
but reduce?  Makes no sense.

--bb
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to