diff options
-rw-r--r-- | Objects/classobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 4ac6a0e..f392fae 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -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); |