diff options
author | Phillip J. Eby <pje@telecommunity.com> | 2005-08-02 00:46:46 (GMT) |
---|---|---|
committer | Phillip J. Eby <pje@telecommunity.com> | 2005-08-02 00:46:46 (GMT) |
commit | 0d6615fd29063bdaccb13e1fbae542fb666d8728 (patch) | |
tree | 0f18d41e2cb8831c9d244ab6586f9f8377592c67 /Modules/gcmodule.c | |
parent | d794666048510deca0d4987a4c74d0fca85be411 (diff) | |
download | cpython-0d6615fd29063bdaccb13e1fbae542fb666d8728.zip cpython-0d6615fd29063bdaccb13e1fbae542fb666d8728.tar.gz cpython-0d6615fd29063bdaccb13e1fbae542fb666d8728.tar.bz2 |
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 38494ea..db9dd32 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`. |