diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-06-08 11:41:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-08 11:41:19 (GMT) |
commit | 6cca5c8459cc439cb050010ffa762a03859d3051 (patch) | |
tree | 9c144fde07123ff6c9d6f87a2a2b3d42883630d4 /Python | |
parent | 865de27dd79571a4a5c7a7d22a07fb909c4a9f8e (diff) | |
download | cpython-6cca5c8459cc439cb050010ffa762a03859d3051.zip cpython-6cca5c8459cc439cb050010ffa762a03859d3051.tar.gz cpython-6cca5c8459cc439cb050010ffa762a03859d3051.tar.bz2 |
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.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index a0c62db..f7690b1 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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 */ |