diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-12-26 11:27:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-26 11:27:01 (GMT) |
commit | ad4857884b4821fc2c9bd23b63d03f9570eb03d1 (patch) | |
tree | fdbc54ffa82549de72904e5b474e02ecf2616a69 /Objects | |
parent | 1944434b44e0118e812bf63f47b268ff6dd0c8f1 (diff) | |
download | cpython-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.c | 4 |
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; |