summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-03-26 11:10:11 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-03-26 11:10:11 (GMT)
commit2c257ab0f85396664536605666af9a6f00c73a4f (patch)
tree3e25870681eefcb6dadd53886e58196add3bad2d /Objects/setobject.c
parent942302371c1e46fdf486a5be0e036f7232a2fba1 (diff)
downloadcpython-2c257ab0f85396664536605666af9a6f00c73a4f.zip
cpython-2c257ab0f85396664536605666af9a6f00c73a4f.tar.gz
cpython-2c257ab0f85396664536605666af9a6f00c73a4f.tar.bz2
Responsibility for argument checking belongs in set.__init__() rather than set.__new__().
See dict.__new__() and list.__new__() for comparison. Neither of those examine or touch args or kwds. That work is done in the __init__() methods.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 8e22b69..34235f8 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1131,9 +1131,6 @@ PySet_Fini(void)
static PyObject *
set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
- if (kwds != NULL && type == &PySet_Type && !_PyArg_NoKeywords("set()", kwds))
- return NULL;
-
return make_new_set(type, NULL);
}