1. Armin Rigo
  2. cpython-withatomic

Commits

Raymond Hettinger  committed 03ec61e

Fix accumulate() example. (Reported by David Murray.)

  • Participants
  • Parent commits 5baac18
  • Branches default

Comments (0)

Files changed (1)

File Doc/whatsnew/3.2.rst

View file
  • Ignore whitespace
   modeled on APL's *scan* operator and Numpy's *accumulate* function:
 
   >>> from itertools import accumulate
-  >>> list(accumulate(8, 2, 50))
+  >>> list(accumulate([8, 2, 50]))
   [8, 10, 60]
 
   >>> prob_dist = [0.1, 0.4, 0.2, 0.3]