summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-29 08:31:52 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-29 08:31:52 (GMT)
commitfa070298e982a39304cb5b6a326b534820d9cad0 (patch)
tree513aa9b5e4566bede3cba9c4efecb0d2944d921e /Objects/setobject.c
parent54b60cf6286b5eeb38af9f3bb25381bb53c27ce1 (diff)
downloadcpython-fa070298e982a39304cb5b6a326b534820d9cad0.zip
cpython-fa070298e982a39304cb5b6a326b534820d9cad0.tar.gz
cpython-fa070298e982a39304cb5b6a326b534820d9cad0.tar.bz2
Issue #26880: Removed redundant checks in set.__init__.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index ac71b2c..3d0f355 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -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;