News for hackers. Stuff that matters.
Re:Zed finishes Learn Python The Hard Way by ubernostrum on Thursday September 30, 2010 @06:11AM (#1742797)
reduce isn't in basic Python anymore

It's in a module in the standard library, a module which contains a bunch of tools for working with higher-order functions. Or, in other words, if you've got a Python 3.x installed, you've got a reduce function available. The only difference is that it's no longer in the default global namespace (map and filter still are, of course).

This matches up pretty cleanly with my actual experience of writing Python; I've written a hell of a lot of Python code these past 6-7 years and so far as I can recall I've never used reduce.

(and if you want to get picky about this, keep in mind how much of Haskell requires import statements to get at -- moving less-commonly-used stuff into standard modules is not a bad thing at all)

There are no comments on this comment yet.