You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: peps/pep-0758.rst
+10-14Lines changed: 10 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,12 +75,14 @@ The decision to allow unparenthesized ``except`` blocks is based on the
75
75
following considerations:
76
76
77
77
1. Simplicity: Removing the requirement for parentheses simplifies the syntax,
78
-
making it more consistent with other parts of the language.
78
+
making it more consistent with other parts of the language.
79
79
80
80
2. Readability: In cases where many exceptions are being caught, the removal of
81
-
parentheses can improve readability by reducing visual clutter.
81
+
parentheses can improve readability by reducing visual clutter.
82
82
83
-
3. Consistency: This change makes the ``except`` clause more consistent with other parts of Python where unambiguous, comma-separated lists don't require parentheses.
83
+
3. Consistency: This change makes the ``except`` clause more consistent with
84
+
other parts of Python where unambiguous, comma-separated lists don't require
85
+
parentheses.
84
86
85
87
Specification
86
88
=============
@@ -90,18 +92,12 @@ list of exception types. The grammar will be updated as follows:
0 commit comments