Kaydet (Commit) 2c257ab0 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

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.
üst 94230237
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment