mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue 8436: set.__init__ accepts keyword args
This commit is contained in:
parent
4ec45df9a7
commit
dbe961215a
2 changed files with 3 additions and 0 deletions
|
@ -1978,6 +1978,8 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds)
|
|||
|
||||
if (!PyAnySet_Check(self))
|
||||
return -1;
|
||||
if (PySet_Check(self) && !_PyArg_NoKeywords("set()", kwds))
|
||||
return -1;
|
||||
if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
|
||||
return -1;
|
||||
set_clear_internal(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue