mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #26880: Removed redundant checks in set.__init__.
This commit is contained in:
parent
54b60cf628
commit
fa070298e9
1 changed files with 1 additions and 3 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue