mirror of
https://github.com/python/cpython
synced 2024-10-14 15:21:52 +00:00
Support passing in an empty dictionary of keywords to newinstanceobject.
This commit is contained in:
parent
1d6fddb776
commit
8bcf369cf9
|
@ -347,7 +347,9 @@ newinstanceobject(class, arg, kw)
|
|||
if (init == NULL) {
|
||||
err_clear();
|
||||
if (arg != NULL && (!is_tupleobject(arg) ||
|
||||
gettuplesize(arg) != 0) || kw != NULL) {
|
||||
gettuplesize(arg) != 0)
|
||||
|| kw != NULL && (!is_dictobject(kw) ||
|
||||
getdictsize(kw) != 0)) {
|
||||
err_setstr(TypeError,
|
||||
"this constructor takes no arguments");
|
||||
DECREF(inst);
|
||||
|
|
Loading…
Reference in a new issue