Nick Coghlan wrote:
One of the
premises of PEP 343 was "Got a frequently recurring block of code that
only has one variant sequence of statements somewhere in the middle?
Well, now you can factor that out
Um, no -- it says explicitly right at the very top of
PEP 343 that it's only about factoring out try/finally
statements.
There's no way that
try:
code_block
finally:
...
can fail to enter the code block if you get as far as
the "try". So it's not reasonable to expect the with
statement to provide this ability.
--
Greg
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com