]> granicus.if.org Git - python/commitdiff
Issue #26880: Removed redundant checks in set.__init__.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 29 Apr 2016 08:31:52 +0000 (11:31 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 29 Apr 2016 08:31:52 +0000 (11:31 +0300)
Objects/setobject.c

index ac71b2ccee49863a8a7359b0f62931d43ef8eb10..3d0f355fe7fe1ce524c0222a30eb1e1490d07097 100644 (file)
@@ -1998,9 +1998,7 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds)
 {
     PyObject *iterable = NULL;
 
-    if (!PyAnySet_Check(self))
-        return -1;
-    if (kwds != NULL && PySet_Check(self) && !_PyArg_NoKeywords("set()", kwds))
+    if (kwds != NULL && !_PyArg_NoKeywords("set()", kwds))
         return -1;
     if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
         return -1;