[pypy-issue] Issue #2026: itertools.accumulate seems to expect the wrong number of arguments (pypy/pypy)

ceridwenv issues-reply at bitbucket.org
Sun Apr 12 05:28:19 CEST 2015


New issue 2026: itertools.accumulate seems to expect the wrong number of arguments
https://bitbucket.org/pypy/pypy/issue/2026/itertoolsaccumulate-seems-to-expect-the

ceridwenv:

In the interpreter:

```
#!python
>>>> from itertools import accumulate
>>>> import operator
>>>> data = [3, 4, 6, 2, 1, 9, 0, 7, 5, 8]
>>>> list(accumulate(data, operator.mul))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __new__() takes exactly 2 arguments (3 given)
>>>> list(accumulate(data, max))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __new__() takes exactly 2 arguments (3 given)
```

These examples are taken from the documentation for itertools.




More information about the pypy-issue mailing list