5

Both have exact same documentation, and it seems to me that both stem from same source code in https://hg.python.org/cpython/file/Modules/_functoolsmodule.c.

However, I am not sure about it. I didn't find any other refernces in the source code of CPython. Can some one shed some more light on this here?

4

1 回答 1

10

根据Python 2 中的文档functools.reduce

这与reduce()的功能相同。它在此模块中可用,以允许编写与 Python 3 更向前兼容的代码。

于 2016-05-01T21:22:21.767 回答