summaryrefslogtreecommitdiffstats
path: root/Parser/Python.asdl
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-02-27 00:24:13 (GMT)
committerThomas Wouters <thomas@python.org>2006-02-27 00:24:13 (GMT)
commitdca3b9c797f6dd4b08d590fa2aa1031e22ab598e (patch)
treed2b7aa53793110100965906b1266296d08bd4ec1 /Parser/Python.asdl
parentd3a5f53a27be821cfdff869fd8ad93a060497e8c (diff)
downloadcpython-dca3b9c797f6dd4b08d590fa2aa1031e22ab598e.zip
cpython-dca3b9c797f6dd4b08d590fa2aa1031e22ab598e.tar.gz
cpython-dca3b9c797f6dd4b08d590fa2aa1031e22ab598e.tar.bz2
PEP 308 implementation, including minor refdocs and some testcases. It
breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
Diffstat (limited to 'Parser/Python.asdl')
-rw-r--r--Parser/Python.asdl1
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index b0d383f..1b7e698 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -52,6 +52,7 @@ module Python
| BinOp(expr left, operator op, expr right)
| UnaryOp(unaryop op, expr operand)
| Lambda(arguments args, expr body)
+ | IfExp(expr test, expr body, expr orelse)
| Dict(expr* keys, expr* values)
| ListComp(expr elt, comprehension* generators)
| GeneratorExp(expr elt, comprehension* generators)