[Python-checkins] r53379 - sandbox/trunk/2to3/Grammar.txt

guido.van.rossum python-checkins at python.org
Thu Jan 11 18:54:08 CET 2007


Author: guido.van.rossum
Date: Thu Jan 11 18:54:07 2007
New Revision: 53379

Modified:
   sandbox/trunk/2to3/Grammar.txt
Log:
Make the grammar accept 'as' in an except clause, so fix_except can be
idempotent.


Modified: sandbox/trunk/2to3/Grammar.txt
==============================================================================
--- sandbox/trunk/2to3/Grammar.txt	(original)
+++ sandbox/trunk/2to3/Grammar.txt	Thu Jan 11 18:54:07 2007
@@ -85,7 +85,7 @@
 with_stmt: 'with' test [ with_var ] ':' suite
 with_var: 'as' expr
 # NB compile.c makes sure that the default except clause is last
-except_clause: 'except' [test [',' test]]
+except_clause: 'except' [test [(',' | 'as') test]]
 suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
 
 # Backward compatibility cruft to support:


More information about the Python-checkins mailing list