diff options
author | Raymond Hettinger <python@rcn.com> | 2007-01-11 18:22:55 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2007-01-11 18:22:55 +0000 |
commit | 9fdfadb06ee3c6d182af084afaa97bc6bf4652bc (patch) | |
tree | 98dbbae4cf1e3e87bd32c96c7914af1983912f06 /Objects/setobject.c | |
parent | a398e2d0592464b6594bac0e4ee3ef091cce5159 (diff) | |
download | cpython-git-9fdfadb06ee3c6d182af084afaa97bc6bf4652bc.tar.gz |
SF #1486663 -- Allow keyword args in subclasses of set() and frozenset().
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index 507a07bdcc..f038ee3fde 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1004,7 +1004,7 @@ frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *iterable = NULL, *result; - if (!_PyArg_NoKeywords("frozenset()", kwds)) + if (type == &PyFrozenSet_Type && !_PyArg_NoKeywords("frozenset()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, type->tp_name, 0, 1, &iterable)) @@ -1048,7 +1048,7 @@ PySet_Fini(void) static PyObject * set_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - if (!_PyArg_NoKeywords("set()", kwds)) + if (type == &PySet_Type && !_PyArg_NoKeywords("set()", kwds)) return NULL; return make_new_set(type, NULL); |