]> granicus.if.org Git - python/commitdiff
Fix accumulate() example. (Reported by David Murray.)
authorRaymond Hettinger <python@rcn.com>
Mon, 14 Feb 2011 18:18:49 +0000 (18:18 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 14 Feb 2011 18:18:49 +0000 (18:18 +0000)
Doc/whatsnew/3.2.rst

index 98d85999270c41dc71f81439f8fa66320e49ad37..d6c9b3f5da9ec4f350f3f60f44c20c4ad07d09d9 100644 (file)
@@ -824,7 +824,7 @@ itertools
   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]