[docs] [issue23049] Fix functools.reduce code equivalent.
Terry J. Reedy
report at bugs.python.org
Sun Dec 14 19:24:06 CET 2014
Terry J. Reedy added the comment:
Background: the OP of #19202 proposed equivalent code for all the functool functions, including two versions for reduce. Georg combined the two versions into the one that Raymond pushed. Both agreed that reduce was the only function that really needed this. I called Georg's code 'excellent'.
I have changed my mind slightly because people use such code equivalents not only for understanding but also as models for writing code, and because some people have had problems when by doing the same as this model, which ignores the empty iterable case.
If you do not want to 'uglify' the doc code by making it exactly equivalent, how about qualifying the claim instead? Change 'equivalent' to 'equivalent for non-empty iterables'.
----------
keywords: +patch
nosy: +georg.brandl
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23049>
_______________________________________
More information about the docs
mailing list