Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, `reduce()` was removed from the standard library between Python 2 and Python 3. Here is Guido arguing that `lambda` and several other functions should be removed as well.[1]

[1] https://www.artima.com/weblogs/viewpost.jsp?thread=98196



> `reduce()` was removed from the standard library

Not true: it was moved from builtins to `functools` module, but it's still there.


Please tell Guido that he got it wrong!

  > Only reduce will be removed from the 3.0 standard library. You can import it from functools.


He did, in fact, misspeak. functools is part of the standard library, and was part of the standard library in 3.0, and contained reduce: https://github.com/python/cpython/blob/3.0/Lib/functools.py#...

What he meant to say is that it's removed from the list of builtins.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: