[Compiler-sig] Changes to TyrExcept
Finn Bock
bckfnn@worldonline.dk
Sun, 14 Apr 2002 10:10:15 GMT
Hi,
I have checked in a fix to TryExcept and except. If I have misunderstood
how it should be used, please scold me gently.
regards,
finn
Index: python.asdl
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/ast/python.asdl,v
retrieving revision 1.10
diff -w -u -r1.10 python.asdl
--- python.asdl 14 Apr 2002 09:23:01 -0000 1.10
+++ python.asdl 14 Apr 2002 10:01:10 -0000
@@ -23,7 +23,7 @@
-- 'type' is a bad name
| Raise(expr? type, expr? inst, expr? tback)
- | TryExcept(stmt* body, except* handlers)
+ | TryExcept(stmt* body, except* handlers, stmt* orelse)
| TryFinally(stmt* body, stmt* finalbody)
| Assert(expr test, expr? msg)
@@ -82,7 +82,7 @@
-- not sure what to call the first argument for raise and except
- except = (expr type, identifier? name)
+ except = (expr? type, assign? name, stmt* body)
-- XXX need to handle 'def f((a, b)):'
arguments = (identifier* args, identifier? vararg,