summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-09-06 06:28:06 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-09-06 06:28:06 (GMT)
commitca460d9722c9542004c4cf34d9231641ac18e34b (patch)
treeb007e31668de7ff4b37e0c8d80dc575e8b600118 /Python/ast.c
parent98775dfebc86aca40b27dcca5e4f4fd3a07e8acb (diff)
downloadcpython-ca460d9722c9542004c4cf34d9231641ac18e34b.zip
cpython-ca460d9722c9542004c4cf34d9231641ac18e34b.tar.gz
cpython-ca460d9722c9542004c4cf34d9231641ac18e34b.tar.bz2
with and as are now keywords. There are some generated files I can't recreate.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 4883cc2..9e0c184 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -2190,10 +2190,6 @@ alias_for_import_name(struct compiling *c, const node *n)
case import_as_name:
str = NULL;
if (NCH(n) == 3) {
- if (strcmp(STR(CHILD(n, 1)), "as") != 0) {
- ast_error(n, "must use 'as' in import");
- return NULL;
- }
str = NEW_IDENTIFIER(CHILD(n, 2));
}
return alias(NEW_IDENTIFIER(CHILD(n, 0)), str, c->c_arena);
@@ -2206,10 +2202,6 @@ alias_for_import_name(struct compiling *c, const node *n)
alias_ty a = alias_for_import_name(c, CHILD(n, 0));
if (!a)
return NULL;
- if (strcmp(STR(CHILD(n, 1)), "as") != 0) {
- ast_error(n, "must use 'as' in import");
- return NULL;
- }
assert(!a->asname);
a->asname = NEW_IDENTIFIER(CHILD(n, 2));
return a;
@@ -2848,10 +2840,6 @@ static expr_ty
ast_for_with_var(struct compiling *c, const node *n)
{
REQ(n, with_var);
- if (strcmp(STR(CHILD(n, 0)), "as") != 0) {
- ast_error(n, "expected \"with [expr] as [var]\"");
- return NULL;
- }
return ast_for_expr(c, CHILD(n, 1));
}