[issue25718] itertools.accumulate __reduce__/__setstate__ bug

Serhiy Storchaka report at bugs.python.org
Mon Dec 7 08:18:46 EST 2015


Serhiy Storchaka added the comment:

Well, we can fix this without breaking the protocol. The accumulate() object with state is None can be reconstructed as islice(accumulate(chain([None], iterator)), 1, None).

Proposed patch implements this solution.

----------
Added file: http://bugs.python.org/file41261/itertools_accumulate_state_is_none.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25718>
_______________________________________


More information about the Python-bugs-list mailing list