News for hackers. Stuff that matters.
Re:Python 3 Is Winning Library Developer Support by Veedrac on Tuesday March 08, 2016 @10:47PM (#11250775)
Moving reduce into functools was more than justified: almost nobody liked it, most people disliked it and if you really want to use if for whatever reason an import is hardly difficult. The decision was made because of the context, not in disregard to it.
Re:Python 3 Is Winning Library Developer Support by pcote on Wednesday March 09, 2016 @08:48AM (#11252890)
The move of reduce to functools makes sense. But it's also inconsistent. map and filter should also be in the functools package tools right alongside partial and reduce. But instead, they're in __builtins__ because .... they're more popular I guess?
Re:Python 3 Is Winning Library Developer Support by deadowl on Wednesday March 09, 2016 @09:21AM (#11253077)
I'd actually be OK if map and filter were also in the functools package, but the only way to be consistent while maintaining backwards compatibility is going from the functools package to built-in.
Re:Python 3 Is Winning Library Developer Support by lmm on Wednesday March 09, 2016 @07:53AM (#11252645)
Who disliked it? I used it all the time. Was there any survey or similar?
Re:Python 3 Is Winning Library Developer Support by Vaskivo on Wednesday March 09, 2016 @08:45AM (#11252884)
Guido disliked it. And he's the BDFL.
Re:Python 3 Is Winning Library Developer Support by Veedrac on Wednesday March 09, 2016 @10:08AM (#11253354)
That's not quite a fair reduction; if it was just down to Guido map would be displaced too, or even gone.
Re:Python 3 Is Winning Library Developer Support by spiralx on Wednesday March 09, 2016 @10:50PM (#11257291)
You could quite easily use a process like the one described in the article to select the 'top' 1,000 Python packages, and then scan each of those for occurrences of calls to each of map, filter and reduce, and that way build up a fairly reasonable picture of how commonly each function is used.

While I use reduce a lot, I would guess that even with comprehensions making most uses of map and filter obsolete, that reduce is still the least commonly called of the three.