A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-May/053722.html below:

[Python-Dev] Merging PEP 310 and PEP 340-redux?

[Python-Dev] Merging PEP 310 and PEP 340-redux?Guido van Rossum gvanrossum at gmail.com
Fri May 13 20:38:51 CEST 2005
[Nick Coghlan]
> However, I'm fine with declaring that, from the perspective of a statement
> template, 'return', 'break' and 'continue' are all 'non-exceptional exits', and
> so templates like transaction() are expected to treat them as such.

Me too. The argument that made me realize this is okay came after
reading Raymond Chen's rant about control-flow macros: when you catch
an exception, you don't know how much of the try-block was executed
successfully, and neither does the author of that block; but when you
"catch" a non-local goto, you must assume that the block's author
knows what they are doing, so at least *they* know exactly which code
was executed (everything up to the break/continue/return) and which
wasn't. So the argument about rolling back indeterminate results
doesn't hold. If they want the transaction to fail, they should raise
an exception.

I really need to start writing PEP 343 to capture this particular
solution more carefully.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4