[Python-checkins] peps: PEP 463: Few more markup fixes

yury.selivanov python-checkins at python.org
Fri Feb 21 06:08:53 CET 2014


http://hg.python.org/peps/rev/e412cc3a0a91
changeset: 5380:e412cc3a0a91
user: Yury Selivanov <yselivanov at sprymix.com>
date: Fri Feb 21 00:08:48 2014 -0500
summary:
 PEP 463: Few more markup fixes
HGe: Enter commit message. Lines beginning with 'HG:' are removed.
files:
 pep-0463.txt | 26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/pep-0463.txt b/pep-0463.txt
--- a/pep-0463.txt
+++ b/pep-0463.txt
@@ -752,23 +752,23 @@
 for several reasons.
 
 * First and foremost, consistency with the statement form of try/except
-would be broken. Just as a list comprehension or ternary if expression
-can be explained by "breaking it out" into its vertical statement form,
-an expression-except should be able to be explained by a relatively
-mechanical translation into a near-equivalent statement. Any form of
-syntax common to both should therefore have the same semantics in each,
-and above all should not have the subtle difference of catching more in
-one than the other, as it will tend to attract unnoticed bugs.
+ would be broken. Just as a list comprehension or ternary if expression
+ can be explained by "breaking it out" into its vertical statement form,
+ an expression-except should be able to be explained by a relatively
+ mechanical translation into a near-equivalent statement. Any form of
+ syntax common to both should therefore have the same semantics in each,
+ and above all should not have the subtle difference of catching more in
+ one than the other, as it will tend to attract unnoticed bugs.
 
 * Secondly, the set of appropriate exceptions to catch would itself be
-a huge point of contention. It would be impossible to predict exactly
-which exceptions would "make sense" to be caught; why bless some of them
-with convenient syntax and not others?
+ a huge point of contention. It would be impossible to predict exactly
+ which exceptions would "make sense" to be caught; why bless some of them
+ with convenient syntax and not others?
 
 * And finally (this partly because the recommendation was that a bare
-except should be actively encouraged, once it was reduced to a "reasonable"
-set of exceptions), any situation where you catch an exception you don't
-expect to catch is an unnecessary bug magnet.
+ except should be actively encouraged, once it was reduced to a "reasonable"
+ set of exceptions), any situation where you catch an exception you don't
+ expect to catch is an unnecessary bug magnet.
 
 Consequently, the use of a bare 'except' is down to two possibilities:
 either it is syntactically forbidden in the expression form, or it is
-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /