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 <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to