-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
From this defitinion I undertand that I can pass value
as a named keyword, but I can't:
>>> dict.fromkeys(x, value=0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: dict.fromkeys() takes no keyword arguments
>>> import inspect
>>> inspect.signature(dict.fromkeys)
<Signature (iterable, value=None, /)>
I just made this error in a real code: wemake-services/wemake-python-styleguide#2994
Many other definitions in this file use /
to properly mark positional only parameters. Like:
and etc.
So, I will send a PR to add /
to dict.fromkeys
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error