summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-04-18 23:05:22 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-04-18 23:05:22 (GMT)
commit3fb156caa4373e90d1e853f03dc58151ad9ffec8 (patch)
treecf46fb7f57c1759606c0b0ba613fe4ea7e736e49 /Objects
parent2db462dc6945a2e1af27d6670d1c6749b502a86f (diff)
downloadcpython-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.c2
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);