From 91ab4a8353447f265a7559a4769ac5404bb0b157 Mon Sep 17 00:00:00 2001
From: Guido van Rossum <guido@python.org>
Date: Tue, 16 Aug 1994 22:13:47 +0000
Subject: If an attribute is deleted, __setattr__ is called with 2 instead of 3
 arguments (adding __delattr__ was deemed too much overhead)

---
 Objects/classobject.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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);
-- 
cgit v0.12

