diff options
-rw-r--r-- | Objects/classobject.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index b8b72e9..a05c0bf 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -459,7 +459,11 @@ instance_setattr(inst, name, v) { object *ac; if (inst->in_setattr != NULL) { - object *args = mkvalue("(sO)", name, v); + object *args; + if (v == NULL) + args = mkvalue("(s)", name); + else + args = mkvalue("(sO)", name, v); if (args != NULL) { object *res = call_object(inst->in_setattr, args); DECREF(args); |