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:
Serhiy Storchaka 2017-06-08 14:41:19 +03:00 committed by GitHub
parent 865de27dd7
commit 6cca5c8459
13 changed files with 23 additions and 23 deletions

View file

@ -429,7 +429,7 @@ filter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *it;
filterobject *lz;
if (type == &PyFilter_Type && !_PyArg_NoKeywords("filter()", kwds))
if (type == &PyFilter_Type && !_PyArg_NoKeywords("filter", kwds))
return NULL;
if (!PyArg_UnpackTuple(args, "filter", 2, 2, &func, &seq))
@ -1125,7 +1125,7 @@ map_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
mapobject *lz;
Py_ssize_t numargs, i;
if (type == &PyMap_Type && !_PyArg_NoKeywords("map()", kwds))
if (type == &PyMap_Type && !_PyArg_NoKeywords("map", kwds))
return NULL;
numargs = PyTuple_Size(args);
@ -2446,7 +2446,7 @@ zip_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *result;
Py_ssize_t tuplesize;
if (type == &PyZip_Type && !_PyArg_NoKeywords("zip()", kwds))
if (type == &PyZip_Type && !_PyArg_NoKeywords("zip", kwds))
return NULL;
/* args must be a tuple */