diff options
author | Raymond Hettinger <python@rcn.com> | 2010-04-18 23:05:22 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-04-18 23:05:22 (GMT) |
commit | 3fb156caa4373e90d1e853f03dc58151ad9ffec8 (patch) | |
tree | cf46fb7f57c1759606c0b0ba613fe4ea7e736e49 /Objects | |
parent | 2db462dc6945a2e1af27d6670d1c6749b502a86f (diff) | |
download | cpython-3fb156caa4373e90d1e853f03dc58151ad9ffec8.zip cpython-3fb156caa4373e90d1e853f03dc58151ad9ffec8.tar.gz cpython-3fb156caa4373e90d1e853f03dc58151ad9ffec8.tar.bz2 |
Issue 8436: set.__init__ accepts keyword args
Diffstat (limited to 'Objects')
-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 9447441..aaa4838 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); |