Skip to content

Commit fa07029

Browse files
Issue python#26880: Removed redundant checks in set.__init__.
1 parent 54b60cf commit fa07029

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎Objects/setobject.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,9 +1998,7 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds)
19981998
{
19991999
PyObject *iterable = NULL;
20002000

2001-
if (!PyAnySet_Check(self))
2002-
return -1;
2003-
if (kwds != NULL && PySet_Check(self) && !_PyArg_NoKeywords("set()", kwds))
2001+
if (kwds != NULL && !_PyArg_NoKeywords("set()", kwds))
20042002
return -1;
20052003
if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
20062004
return -1;

0 commit comments

Comments
 (0)