Mailing List Archive

python/dist/src/Include Python-ast.h,1.1.2.4,1.1.2.5
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv9163/Include

Modified Files:
Tag: ast-branch
Python-ast.h
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-ast.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/Attic/Python-ast.h,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-ast.h 13 Sep 2002 14:32:12 -0000 1.1.2.4
--- Python-ast.h 2 Oct 2002 11:48:43 -0000 1.1.2.5
***************
*** 1,3 ****
! /* File automatically generated by Parser/asdl_c.py */

#include "asdl.h"
--- 1,3 ----
! /* File automatically generated by ../Parser/asdl_c.py */

#include "asdl.h"
***************
*** 9,13 ****
typedef struct _expr *expr_ty;

! typedef enum _expr_context { Load=1, Store=2, Del=3, AugStore=4 }
expr_context_ty;

--- 9,13 ----
typedef struct _expr *expr_ty;

! typedef enum _expr_context { Load=1, Store=2, Del=3, AugStore=4, Param=5 }
expr_context_ty;