diff options
author | Phillip J. Eby <pje@telecommunity.com> | 2005-08-02 00:46:46 +0000 |
---|---|---|
committer | Phillip J. Eby <pje@telecommunity.com> | 2005-08-02 00:46:46 +0000 |
commit | ee4bf0733bf0fa1db63b18ef4c8b9767f856c847 (patch) | |
tree | 155ff9239b261d60a4858c382bd799ebaa749d25 /Modules/gcmodule.c | |
parent | b6eb11fbf06a69f3efe9aa38645dbc18d40fce83 (diff) | |
download | cpython-ee4bf0733bf0fa1db63b18ef4c8b9767f856c847.tar.gz |
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.
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r-- | Modules/gcmodule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 38494ead3f..db9dd3268c 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -413,10 +413,8 @@ has_finalizer(PyObject *op) 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`. |