diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-08 23:44:13 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-08 23:44:13 (GMT) |
commit | a5a5728cf01446f70c3bd09cc85453fdec71d461 (patch) | |
tree | 8e73f76c79f735981af4c33caf32b1b8fad704d6 /Python | |
parent | 8ea4ded9a69ace6f8520615f770308fcdb485bbb (diff) | |
download | cpython-a5a5728cf01446f70c3bd09cc85453fdec71d461.zip cpython-a5a5728cf01446f70c3bd09cc85453fdec71d461.tar.gz cpython-a5a5728cf01446f70c3bd09cc85453fdec71d461.tar.bz2 |
remove error checks already done in set_context()
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ast.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Python/ast.c b/Python/ast.c index abad2d9..2cc41b2 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -2088,31 +2088,6 @@ ast_for_expr_stmt(struct compiling *c, const node *n) expr1 = ast_for_testlist(c, ch); if (!expr1) return NULL; - /* TODO(nas): Remove duplicated error checks (set_context does it) */ - switch (expr1->kind) { - case GeneratorExp_kind: - ast_error(ch, "augmented assignment to generator " - "expression not possible"); - return NULL; - case Yield_kind: - ast_error(ch, "augmented assignment to yield " - "expression not possible"); - return NULL; - case Name_kind: { - const char *var_name = PyBytes_AS_STRING(expr1->v.Name.id); - if ((var_name[0] == 'N' || var_name[0] == 'T' || var_name[0] == 'F') && - !forbidden_check(c, ch, var_name)) - return NULL; - break; - } - case Attribute_kind: - case Subscript_kind: - break; - default: - ast_error(ch, "illegal expression for augmented " - "assignment"); - return NULL; - } if(!set_context(c, expr1, Store, ch)) return NULL; |