Mailing List Archive

python/dist/src/Parser Python.asdl,1.1.2.4,1.1.2.5
Update of /cvsroot/python/python/dist/src/Parser
In directory usw-pr-cvs1:/tmp/cvs-serv8983/Parser

Modified Files:
Tag: ast-branch
Python.asdl
Log Message:
Experimental change: Add Param to expr_context.

It's convenient to represent a function's parameter list as a sequence
of expressions, because they can contain names or tuples. Rather than
re-using an existing expr_context for the names, make one explicitly
for this purpose.

There are some downsides: Must cover Param in all switch statements.
Param isn't used directly by the AST.


Index: Python.asdl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Parser/Attic/Python.asdl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** Python.asdl 30 Aug 2002 22:09:38 -0000 1.1.2.4
--- Python.asdl 2 Oct 2002 11:47:54 -0000 1.1.2.5
***************
*** 71,75 ****
| Tuple(expr *elts, expr_context ctx)

! expr_context = Load | Store | Del | AugStore

slice = Ellipsis | Slice(expr? lower, expr? upper, expr? step)
--- 71,75 ----
| Tuple(expr *elts, expr_context ctx)

! expr_context = Load | Store | Del | AugStore | Param

slice = Ellipsis | Slice(expr? lower, expr? upper, expr? step)