[issue31575] Functional Programming HOWTO sub-optimal example for reduce

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the existing code conveys the author's message better than the proposed revision. The example isn't about efficiency; rather, it is about comparing several alternative formulations with this one being the weakest of the lost. For emphasizing that

[issue31575] Functional Programming HOWTO sub-optimal example for reduce

2017-09-25 Thread Anran Yang
New submission from Anran Yang: At the end of the Functional Programming HOWTO document (https://docs.python.org/3.7/howto/functional.html) the usage of reduce/lambda/for loops are compared and discussed. However, the example for reduce seems sub-optimal and thus the discussion is not that eff