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.
This commit is contained in:
Raymond Hettinger 2016-03-26 04:10:11 -07:00
parent 942302371c
commit 2c257ab0f8
1 changed files with 0 additions and 3 deletions

View File

@ -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);
}