mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +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
|
@ -1083,7 +1083,7 @@ frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
{
|
||||
PyObject *iterable = NULL, *result;
|
||||
|
||||
if (type == &PyFrozenSet_Type && !_PyArg_NoKeywords("frozenset()", kwds))
|
||||
if (type == &PyFrozenSet_Type && !_PyArg_NoKeywords("frozenset", kwds))
|
||||
return NULL;
|
||||
|
||||
if (!PyArg_UnpackTuple(args, type->tp_name, 0, 1, &iterable))
|
||||
|
@ -2006,7 +2006,7 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds)
|
|||
{
|
||||
PyObject *iterable = NULL;
|
||||
|
||||
if (!_PyArg_NoKeywords("set()", kwds))
|
||||
if (!_PyArg_NoKeywords("set", kwds))
|
||||
return -1;
|
||||
if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue