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