The error messages of `dict()` and `dict().update()` should say `positional argument` instead of only `argument`
Abierto
@serhiy-storchaka ya está trabajando en esto.
Desde el 26/8/2025.
interpreter-core
type-bug
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.