Commit fa070298 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #26880: Removed redundant checks in set.__init__.

parent 54b60cf6
...@@ -1998,9 +1998,7 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds) ...@@ -1998,9 +1998,7 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds)
{ {
PyObject *iterable = NULL; PyObject *iterable = NULL;
if (!PyAnySet_Check(self)) if (kwds != NULL && !_PyArg_NoKeywords("set()", kwds))
return -1;
if (kwds != NULL && PySet_Check(self) && !_PyArg_NoKeywords("set()", kwds))
return -1; return -1;
if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable)) if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment