--- /home/docs/checkouts/readthedocs.org/user_builds/restrictedpython/checkouts/latest/docs/contributing/ast/python3_3.ast
+++ /home/docs/checkouts/readthedocs.org/user_builds/restrictedpython/checkouts/latest/docs/contributing/ast/python3_4.ast
@@ -1,7 +1,7 @@
--- PYTHON 3.3 AST
--- ASDL's five builtin types are identifier, int, string, bytes, object
+-- Python 3.4 AST
+-- ASDL's six builtin types are identifier, int, string, bytes, object, singleton
-module Python version "3.3"
+module Python version "3.4"
{
mod = Module(stmt* body)
| Interactive(stmt* body)
@@ -78,8 +78,8 @@
| Num(object n) -- a number as a PyObject.
| Str(string s) -- need to specify raw, unicode, etc?
| Bytes(bytes s)
+ | NameConstant(singleton value)
| Ellipsis
- -- other literals? bools?
-- the following expression can appear in assignment context
| Attribute(expr value, identifier attr, expr_context ctx)
@@ -141,14 +141,14 @@
attributes (int lineno, int col_offset)
arguments = (arg* args,
- identifier? vararg,
- expr? varargannotation,
+ arg? vararg,
arg* kwonlyargs,
- identifier? kwarg,
- expr? kwargannotation,
- expr* defaults,
- expr* kw_defaults)
+ expr* kw_defaults,
+ arg? kwarg,
+ expr* defaults)
+
arg = (identifier arg, expr? annotation)
+ attributes (int lineno, int col_offset)
-- keyword arguments supplied to call
keyword = (identifier arg, expr value)