diff options
author | Raymond Hettinger <python@rcn.com> | 2010-04-18 23:03:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-04-18 23:03:16 (GMT) |
commit | dbe961215a2cc9d9ef60aadabe9dc2fc94493e0d (patch) | |
tree | c75dad49a61eb44d31b7441350661ac619aaba95 /Objects/setobject.c | |
parent | 4ec45df9a724d2405b516967bc390f7d064f466c (diff) | |
download | cpython-dbe961215a2cc9d9ef60aadabe9dc2fc94493e0d.zip cpython-dbe961215a2cc9d9ef60aadabe9dc2fc94493e0d.tar.gz cpython-dbe961215a2cc9d9ef60aadabe9dc2fc94493e0d.tar.bz2 |
Issue 8436: set.__init__ accepts keyword args
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index d2a55fc..36afeb3 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1978,6 +1978,8 @@ set_init(PySetObject *self, PyObject *args, PyObject *kwds) if (!PyAnySet_Check(self)) return -1; + if (PySet_Check(self) && !_PyArg_NoKeywords("set()", kwds)) + return -1; if (!PyArg_UnpackTuple(args, Py_TYPE(self)->tp_name, 0, 1, &iterable)) return -1; set_clear_internal(self); |