File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,10 +87,15 @@ loops that truncate the stream.
8787
8888.. function :: accumulate(iterable[, func])
8989
90- Make an iterator that returns accumulated sums. Elements may be any addable
91- type including :class: `~decimal.Decimal ` or :class: `~fractions.Fraction `.
92- If the optional *func * argument is supplied, it should be a function of two
93- arguments and it will be used instead of addition.
90+ Make an iterator that returns accumulated sums, or accumulated
91+ results of other binary functions (specified via the optional
92+ *func * argument). If *func * is supplied, it should be a function
93+ of two arguments. Elements of the input *iterable * may be any type
94+ that can be accepted as arguments to *func *. (For example, with
95+ the default operation of addition, elements may be any addable
96+ type including :class: `~decimal.Decimal ` or
97+ :class: `~fractions.Fraction `.) If the input iterable is empty, the
98+ output iterable will also be empty.
9499
95100 Equivalent to::
96101
You can’t perform that action at this time.
0 commit comments