]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#4083: add "as" to except handler grammar as per PEP 3110.
authorGeorg Brandl <georg@python.org>
Thu, 16 Oct 2008 21:38:48 +0000 (21:38 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 16 Oct 2008 21:38:48 +0000 (21:38 +0000)
Doc/reference/compound_stmts.rst

index 07947551401a433e68b947305a2d02b7df94e8db..408298d031c2847dccdf8ce858d70b052246ec5b 100644 (file)
@@ -221,7 +221,7 @@ for a group of statements:
 .. productionlist::
    try_stmt: try1_stmt | try2_stmt
    try1_stmt: "try" ":" `suite`
-            : ("except" [`expression` ["," `target`]] ":" `suite`)+
+            : ("except" [`expression` [("as" | ",") `target`]] ":" `suite`)+
             : ["else" ":" `suite`]
             : ["finally" ":" `suite`]
    try2_stmt: "try" ":" `suite`