Skip to content

[Doc] Wrong parameter name for `concurrent.futures.Executor.map(fn, ...) #112043

@eddiebergman

Description

@eddiebergman

Documentation

Just noticed that in the published documentation, the concurrent.futures.Executor.map says it takes some parameter named func as the first argument, however the implementation has it as fn.

This is a strictly documentation issue and doesn't have non-introspected code related issues, as it's followed by an *iterables argument, preventing it from being used as a keyword.

Implementation:

def map(self, fn, *iterables, timeout=None, chunksize=1):

CPython Doc: https://github.com/python/cpython/blob/d2f305dfd183025a95592319b280fcf4b20c8694/Doc/library/concurrent.futures.rst#executor-objects
Published docs: https://docs.python.org/3.12/library/concurrent.futures.html#concurrent.futures.Executor.map

I came across this while overwriting the Executor class and using the @override decorator which warned me that the naming is inconsistent.

Happy to provide a PR if needed.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions