[Python-checkins] python/dist/src/Python compile.txt, 1.1.2.12,
1.1.2.13
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Sat Apr 2 22:21:25 CEST 2005
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20645/Python
Modified Files:
Tag: ast-branch
compile.txt
Log Message:
Fix ASDL example to include decorators.
Index: compile.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/compile.txt,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -d -r1.1.2.12 -r1.1.2.13
--- compile.txt 2 Apr 2005 20:14:18 -0000 1.1.2.12
+++ compile.txt 2 Apr 2005 20:21:23 -0000 1.1.2.13
@@ -119,11 +119,10 @@
The following fragment of the Python ASDL construct demonstrates the
approach and syntax::
- XXX update example once decorators in
-
module Python
{
- stmt = FunctionDef(identifier name, arguments args, stmt* body)
+ stmt = FunctionDef(identifier name, arguments args, stmt* body,
+ expr* decorators)
| Return(expr? value) | Yield(expr value)
attributes (int lineno)
}
@@ -136,8 +135,9 @@
Modifiers on the argument type specify the number of values needed; '?'
means it is optional, '*' means 0 or more, no modifier means only one
value for the argument and it is required. FunctionDef, for instance,
-takes an identifier for the name, 'arguments' for args, and zero or more
-stmt arguments for 'body'.
+takes an identifier for the name, 'arguments' for args, zero or more
+stmt arguments for 'body', and zero or more expr arguments for
+'decorators'.
Do notice that something like 'arguments', which is a node type, is
represented as a single AST node and not as a sequence of nodes as with
More information about the Python-checkins
mailing list