[New-bugs-announce] [issue35606] Add prod() function to the math module

Raymond Hettinger report at bugs.python.org
Fri Dec 28 14:29:12 EST 2018


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

Back in 2007, a user suggested a built-in prod() function with an API similar to the built-in sum() function.  The proposal was rejected because it wasn't needed often enough to justify a builtin function.  See https://bugs.python.org/issue1093

Though prod() doesn't meet the threshold for a builtin, it would be reasonable to add this to the math module (or an imath module).

Personally, I've wanted and written this function on several occasions (for applications such as multiplying probabilities).  On stack overflow, it has been a popular question with recurring interest.  See https://stackoverflow.com/questions/7948291/ and https://stackoverflow.com/questions/595374

----------
components: Library (Lib)
messages: 332676
nosy: aleax, mark.dickinson, rhettinger, tim.peters
priority: normal
severity: normal
status: open
title: Add prod() function to the math module
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35606>
_______________________________________


More information about the New-bugs-announce mailing list