diff Modules/gcmodule.c @ 35298:b2fe5f8fcfdd legacy-trunk

PEP 342 implementation. Per Guido's comments, the generator throw() method still needs to support string exceptions, and allow None for the third argument. Documentation updates are needed, too.
author Phillip J. Eby <pje@telecommunity.com>
date Tue, 02 Aug 2005 00:46:46 +0000
parents 234b22a2acf3
children 1af7f719ed28
line wrap: on
line diff
--- a/Modules/gcmodule.c	Mon Aug 01 21:39:29 2005 +0000
+++ b/Modules/gcmodule.c	Tue Aug 02 00:46:46 2005 +0000
@@ -413,10 +413,8 @@
 		assert(delstr != NULL);
 		return _PyInstance_Lookup(op, delstr) != NULL;
 	}
-	else if (PyType_HasFeature(op->ob_type, Py_TPFLAGS_HEAPTYPE))
+	else 
 		return op->ob_type->tp_del != NULL;
-	else
-		return 0;
 }
 
 /* Move the objects in unreachable with __del__ methods into `finalizers`.