The error messages of `dict()` and `dict().update()` should say `positional argument` instead of only `argument`
Open
@serhiy-storchaka is already working on this.
Since Aug 26, 2025.
interpreter-core
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Setting 2 positional arguments to dict() and dict().update() gets the error messages saying only argument as shown below:
dict('John', 36)
dict().update('John', 36)
# Error
TypeError: dict expected at most 1 argument, got 2
TypeError: update expected at most 1 argument, got 2
But the error messages should say positional argument instead of only argument as shown below:
TypeError: dict expected at most 1 positional argument, got 2
TypeError: update expected at most 1 positional argument, got 2
Because setting 2 keyword arguments to dict() works as shown below:
dict(name='John', age=36)
dict().update(name='John', age=36)
# No error
Linked PRs
- gh-137721
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.