summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-12-26 11:27:01 (GMT)
committerGitHub <noreply@github.com>2021-12-26 11:27:01 (GMT)
commitad4857884b4821fc2c9bd23b63d03f9570eb03d1 (patch)
treefdbc54ffa82549de72904e5b474e02ecf2616a69 /Objects
parent1944434b44e0118e812bf63f47b268ff6dd0c8f1 (diff)
downloadcpython-ad4857884b4821fc2c9bd23b63d03f9570eb03d1.zip
cpython-ad4857884b4821fc2c9bd23b63d03f9570eb03d1.tar.gz
cpython-ad4857884b4821fc2c9bd23b63d03f9570eb03d1.tar.bz2
bpo-43413: Revert changes in set.__init__ (GH-28403)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/setobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 0be0678..6e110ef 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1946,9 +1946,7 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds)
{
PyObject *iterable = NULL;
- if ((Py_IS_TYPE(self, &PySet_Type) ||
- Py_TYPE(self)->tp_new == PySet_Type.tp_new) &&
- !_PyArg_NoKeywords("set", kwds))
+ if (!_PyArg_NoKeywords("set", kwds))
return -1;
if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable))
return -1;