summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-02-07 07:04:02 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2019-02-07 07:04:02 (GMT)
commitbc098515864d0d1ffe8fb97ca1a0526c30fee45a (patch)
tree2a39dfe4d826700abc132c01db7a92f0de76a7b7 /Doc/library
parente9bc4172d18db9c182d8e04dd7b033097a994c06 (diff)
downloadcpython-bc098515864d0d1ffe8fb97ca1a0526c30fee45a.zip
cpython-bc098515864d0d1ffe8fb97ca1a0526c30fee45a.tar.gz
cpython-bc098515864d0d1ffe8fb97ca1a0526c30fee45a.tar.bz2
bpo-35606: Implement math.prod (GH-11359)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/math.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 76226c2..7129525 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -178,6 +178,18 @@ Number-theoretic and representation functions
of *x* and are floats.
+.. function:: prod(iterable, *, start=1)
+
+ Calculate the product of all the elements in the input *iterable*.
+ The default *start* value for the product is ``1``.
+
+ When the iterable is empty, return the start value. This function is
+ intended specifically for use with numeric values and may reject
+ non-numeric types.
+
+ .. versionadded:: 3.8
+
+
.. function:: remainder(x, y)
Return the IEEE 754-style remainder of *x* with respect to *y*. For