Skip to content

Commit fd2b592

Browse files
committed
gh-120526: Correct signature of map builtin
map requires at least one iterable arg. If you just do `map(map)` you get an error "map() must have at least two arguments." This corrects the signature to reflect this, in line with how it's shown in https://docs.python.org/3/library/functions.html#map . Signed-off-by: Adam Williamson <[email protected]>
1 parent 030b452 commit fd2b592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/bltinmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ static PyMethodDef map_methods[] = {
14751475

14761476

14771477
PyDoc_STRVAR(map_doc,
1478-
"map(function, /, *iterables)\n\
1478+
"map(function, iterable, /, *iterables)\n\
14791479
--\n\
14801480
\n\
14811481
Make an iterator that computes the function using arguments from\n\

0 commit comments

Comments
 (0)