mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-30592: Fixed error messages for some builtins. (#1996)
Error messages when pass keyword arguments to some builtins that don't support keyword arguments contained double parenthesis: "()()". The regression was introduced by bpo-30534.
This commit is contained in:
parent
865de27dd7
commit
6cca5c8459
13 changed files with 23 additions and 23 deletions
|
@ -949,7 +949,7 @@ itemgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
PyObject *item;
|
||||
Py_ssize_t nitems;
|
||||
|
||||
if (!_PyArg_NoKeywords("itemgetter()", kwds))
|
||||
if (!_PyArg_NoKeywords("itemgetter", kwds))
|
||||
return NULL;
|
||||
|
||||
nitems = PyTuple_GET_SIZE(args);
|
||||
|
@ -1124,7 +1124,7 @@ attrgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
PyObject *attr;
|
||||
Py_ssize_t nattrs, idx, char_idx;
|
||||
|
||||
if (!_PyArg_NoKeywords("attrgetter()", kwds))
|
||||
if (!_PyArg_NoKeywords("attrgetter", kwds))
|
||||
return NULL;
|
||||
|
||||
nattrs = PyTuple_GET_SIZE(args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue