Issue 29893: create_subprocess_exec doc doesn't match software (original) (raw)
The documentation for asyncio.create_subprocess_exec says this is the definition . . .
asyncio.create_subprocess_exec(*args, stdin=None, stdout=None, stderr=None, loop=None, limit=None, **kwds)
The actual definition is this . . .
def create_subprocess_exec(program, *args, stdin=None, stdout=None,
stderr=None, loop=None,
limit=streams._DEFAULT_LIMIT, **kwds)
Notice the first argument (program) at the start of the actual definition.
Ah, I wrote "def create_subprocess_exec(program, *args," to implicitly check that args is non empty.
We can either change the function prototype to check that args is non-empty in the body, or just update the documentation.
The documentation is not exactly wrong :-)