diff options
author | Thomas Wouters <thomas@python.org> | 2006-02-27 00:24:13 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-02-27 00:24:13 (GMT) |
commit | dca3b9c797f6dd4b08d590fa2aa1031e22ab598e (patch) | |
tree | d2b7aa53793110100965906b1266296d08bd4ec1 /Python/symtable.c | |
parent | d3a5f53a27be821cfdff869fd8ad93a060497e8c (diff) | |
download | cpython-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 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index fd95bd5..b66abc9 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -1084,6 +1084,11 @@ symtable_visit_expr(struct symtable *st, expr_ty e) return 0; break; } + case IfExp_kind: + VISIT(st, expr, e->v.IfExp.test); + VISIT(st, expr, e->v.IfExp.body); + VISIT(st, expr, e->v.IfExp.orelse); + break; case Dict_kind: VISIT_SEQ(st, expr, e->v.Dict.keys); VISIT_SEQ(st, expr, e->v.Dict.values); |