summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-04-18 22:59:34 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-04-18 22:59:34 (GMT)
commitefa19849ce8ee11cc005af35b1cbfac0eaeb2a49 (patch)
treedc40f96843b53cf8d1f4966bc05eaf9528b13208 /Objects/setobject.c
parenta23bccee075df412e734c6261e9507979f388197 (diff)
downloadcpython-efa19849ce8ee11cc005af35b1cbfac0eaeb2a49.zip
cpython-efa19849ce8ee11cc005af35b1cbfac0eaeb2a49.tar.gz
cpython-efa19849ce8ee11cc005af35b1cbfac0eaeb2a49.tar.bz2
Issue 8436: set.__init__ accepts keyword args
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index af5d576..47362eb 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1987,6 +1987,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);