-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
There is a trailing s at TypeError exception message from initializer of collecitons.OrderedDict.
Test code:
import collections
collections.OrderedDict(1, 2, 3)And result shows:
Traceback (most recent call last):
File "<python-input-1>", line 2, in <module>
collections.OrderedDict(1, 2, 3)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: expected at most 1 arguments, got 3
There is a trailing s at argument.
In other cases, it will show argument if only one argument expected:
import collections
list(1, 2, 3) # TypeError: list expected at most 1 argument, got 3
dict(1, 2, 3) # TypeError: dict expected at most 1 argument, got 3
set(1, 2, 3) # TypeError: set expected at most 1 argument, got 3
collections.OrderedDict(1, 2, 3) # TypeError: expected at most 1 arguments, got 3CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error