mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-112043: Align concurrent.futures.Executor.map docs with implementation (#114153)
The first parameter is named 'fn', not 'func'.
This commit is contained in:
parent
05008c27b7
commit
8d26db45df
1 changed files with 5 additions and 5 deletions
|
@ -39,14 +39,14 @@ Executor Objects
|
||||||
future = executor.submit(pow, 323, 1235)
|
future = executor.submit(pow, 323, 1235)
|
||||||
print(future.result())
|
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;
|
* the *iterables* are collected immediately rather than lazily;
|
||||||
|
|
||||||
* *func* is executed asynchronously and several calls to
|
* *fn* is executed asynchronously and several calls to
|
||||||
*func* may be made concurrently.
|
*fn* may be made concurrently.
|
||||||
|
|
||||||
The returned iterator raises a :exc:`TimeoutError`
|
The returned iterator raises a :exc:`TimeoutError`
|
||||||
if :meth:`~iterator.__next__` is called and the result isn't available
|
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
|
*timeout* can be an int or a float. If *timeout* is not specified or
|
||||||
``None``, there is no limit to the wait time.
|
``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.
|
raised when its value is retrieved from the iterator.
|
||||||
|
|
||||||
When using :class:`ProcessPoolExecutor`, this method chops *iterables*
|
When using :class:`ProcessPoolExecutor`, this method chops *iterables*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue