Mercurial > cpython-lru_cache-weakref
diff Python/ast.c @ 54743:40c8c35492f1 legacy-trunk
when no module is given in a 'from' relative import, make ImportFrom.module NULL
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 13 Jun 2009 20:23:33 +0000 |
| parents | 3eb8510808c9 |
| children | 7bf8fc20037a |
line wrap: on
line diff
--- a/Python/ast.c Sat Jun 13 17:08:53 2009 +0000 +++ b/Python/ast.c Sat Jun 13 20:23:33 2009 +0000 @@ -2440,7 +2440,7 @@ int n_children; int idx, ndots = 0; alias_ty mod = NULL; - identifier modname; + identifier modname = NULL; /* Count the number of dots (for relative imports) and check for the optional module name */ @@ -2504,8 +2504,6 @@ } if (mod != NULL) modname = mod->name; - else - modname = new_identifier("", c->c_arena); return ImportFrom(modname, aliases, ndots, lineno, col_offset, c->c_arena); }
