summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/functions.rst11
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 03fc41f..a7549b9 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1205,14 +1205,19 @@ are always available. They are listed here in alphabetical order.
unchanged from previous versions.
-.. function:: map(function, iterable, *iterables)
+.. function:: map(function, iterable, /, *iterables, strict=False)
Return an iterator that applies *function* to every item of *iterable*,
yielding the results. If additional *iterables* arguments are passed,
*function* must take that many arguments and is applied to the items from all
iterables in parallel. With multiple iterables, the iterator stops when the
- shortest iterable is exhausted. For cases where the function inputs are
- already arranged into argument tuples, see :func:`itertools.starmap`\.
+ shortest iterable is exhausted. If *strict* is ``True`` and one of the
+ iterables is exhausted before the others, a :exc:`ValueError` is raised. For
+ cases where the function inputs are already arranged into argument tuples,
+ see :func:`itertools.starmap`.
+
+ .. versionchanged:: 3.14
+ Added the *strict* parameter.
.. function:: max(iterable, *, key=None)