[Python-Dev] exec/with thunk-handling proposal

Moore, Paul Paul.Moore@atosorigin.com
Tue, 4 Feb 2003 14:29:17 -0000


From: Jeff Epler [mailto:jepler@unpythonic.net]
> This made me realize something.  What happens if some sort of
> exception is raised between 'f1 =3D open()' and the start of the
> block 'with autoclose(f1):'?
[...]
> Please let me know what simple fact I'm missing.

Nothing much, other than the fact that this is an issue with the
try...except form as well. Basically, this isn't a problem that
the proposal is trying to solve.

I'll add a paragraph to the PEP to note this point, though...

Paul.