diff options
author | Raymond Hettinger <python@rcn.com> | 2010-04-18 22:57:57 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-04-18 22:57:57 +0000 |
commit | 35b76027f94b12911cc97f960ebbb3c137d10d2b (patch) | |
tree | ecbcfd71602342e63491934e0eb744821b602ef6 /Objects/setobject.c | |
parent | 9958c56eb0e2b71c1bea5abcc627899d0bed17dc (diff) | |
download | cpython-git-35b76027f94b12911cc97f960ebbb3c137d10d2b.tar.gz |
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 ab281af3f5..f97b0c02f4 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); |