This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: yield allowed in try/finally
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: nascheme, nnorwitz, orenti
Priority: normal Keywords: patch

Created on 2002-07-21 20:29 by orenti, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
genfinally.patch orenti, 2002-07-21 20:29
Messages (4)
msg40622 - (view) Author: Oren Tirosh (orenti) Date: 2002-07-21 20:29
A generator's dealloc function now resumes a generator
one last time by jumping directly to the return statement at 
the end of the code.  As a result, the finally section of any 
try/finally blocks is executed.  Any exceptions raised are 
treated just like exceptions in a __del__ finalizer.

msg40623 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2002-07-29 21:23
Logged In: YES 
user_id=35752

The GC will need to be taught about these finalizers.  Look
for the
method 'has_finalizer' in gcmodule.c.  I don't think we want
that
method to return true for all generator objects since that would
cause any reference cycle containing a generator to become
uncollectable.
msg40624 - (view) Author: Oren Tirosh (orenti) Date: 2002-08-05 12:14
Logged In: YES 
user_id=562624

Patch abandoned.
msg40625 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-08-06 17:49
Logged In: YES 
user_id=33168

I'm closing since Oren abandoned this patch.
History
Date User Action Args
2022-04-10 16:05:31adminsetgithub: 36916
2002-07-21 20:29:43orenticreate