Mercurial > cpython-lru_cache-weakref
diff Python/ast.c @ 54727:0c357e3fc3d0 legacy-trunk
keep the slice.step field as NULL if no step expression is given
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 13 Jun 2009 01:40:00 +0000 |
| parents | 5306b84d4fce |
| children | 788e1397ce77 |
line wrap: on
line diff
--- a/Python/ast.c Fri Jun 12 23:03:35 2009 +0000 +++ b/Python/ast.c Sat Jun 13 01:40:00 2009 +0000 @@ -1468,14 +1468,7 @@ ch = CHILD(n, NCH(n) - 1); if (TYPE(ch) == sliceop) { - if (NCH(ch) == 1) { - /* No expression, so step is None */ - ch = CHILD(ch, 0); - step = Name(new_identifier("None", c->c_arena), Load, - LINENO(ch), ch->n_col_offset, c->c_arena); - if (!step) - return NULL; - } else { + if (NCH(ch) != 1) { ch = CHILD(ch, 1); if (TYPE(ch) == test) { step = ast_for_expr(c, ch);
