]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112043: Align concurrent.futures.Executor.map docs with implementation (#114153)
authorErlend E. Aasland <erlend@python.org>
Wed, 17 Jan 2024 01:31:16 +0000 (02:31 +0100)
committerGitHub <noreply@github.com>
Wed, 17 Jan 2024 01:31:16 +0000 (01:31 +0000)
The first parameter is named 'fn', not 'func'.

Doc/library/concurrent.futures.rst

index deefb8606ead8444dd609135519f002e6a296005..760e1196d7cf9a71e957547dde2759ba35f707cf 100644 (file)
@@ -39,14 +39,14 @@ Executor Objects
              future = executor.submit(pow, 323, 1235)
              print(future.result())
 
-   .. method:: map(func, *iterables, timeout=None, chunksize=1)
+   .. method:: map(fn, *iterables, timeout=None, chunksize=1)
 
-      Similar to :func:`map(func, *iterables) <map>` except:
+      Similar to :func:`map(fn, *iterables) <map>` except:
 
       * the *iterables* are collected immediately rather than lazily;
 
-      * *func* is executed asynchronously and several calls to
-        *func* may be made concurrently.
+      * *fn* is executed asynchronously and several calls to
+        *fn* may be made concurrently.
 
       The returned iterator raises a :exc:`TimeoutError`
       if :meth:`~iterator.__next__` is called and the result isn't available
@@ -54,7 +54,7 @@ Executor Objects
       *timeout* can be an int or a float.  If *timeout* is not specified or
       ``None``, there is no limit to the wait time.
 
-      If a *func* call raises an exception, then that exception will be
+      If a *fn* call raises an exception, then that exception will be
       raised when its value is retrieved from the iterator.
 
       When using :class:`ProcessPoolExecutor`, this method chops *iterables*