diff options
author | Collin Winter <collinw@gmail.com> | 2007-05-18 23:11:24 +0000 |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-05-18 23:11:24 +0000 |
commit | 6290305e6722c20e17d3c73bd6a30c6448bead83 (patch) | |
tree | fc3cc9d13179cb407116ebac000400c9c294140a /Python | |
parent | 6eb7bede72f044b0b6a73551c04281defc7fc489 (diff) | |
download | cpython-git-6290305e6722c20e17d3c73bd6a30c6448bead83.tar.gz |
Backport PEP 3110's new 'except' syntax to 2.6.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ast.c | 2 | ||||
-rw-r--r-- | Python/graminit.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Python/ast.c b/Python/ast.c index ace4950402..27c3efaac8 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -2765,7 +2765,7 @@ ast_for_for_stmt(struct compiling *c, const node *n) static excepthandler_ty ast_for_except_clause(struct compiling *c, const node *exc, node *body) { - /* except_clause: 'except' [test [',' test]] */ + /* except_clause: 'except' [test [(',' | 'as') test]] */ REQ(exc, except_clause); REQ(body, suite); diff --git a/Python/graminit.c b/Python/graminit.c index 33ef64b8b7..1f74504235 100644 --- a/Python/graminit.c +++ b/Python/graminit.c @@ -931,7 +931,8 @@ static arc arcs_42_1[2] = { {26, 2}, {0, 1}, }; -static arc arcs_42_2[2] = { +static arc arcs_42_2[3] = { + {78, 3}, {27, 3}, {0, 2}, }; @@ -944,7 +945,7 @@ static arc arcs_42_4[1] = { static state states_42[5] = { {1, arcs_42_0}, {2, arcs_42_1}, - {2, arcs_42_2}, + {3, arcs_42_2}, {1, arcs_42_3}, {1, arcs_42_4}, }; |