diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-13 20:23:33 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-13 20:23:33 (GMT) |
commit | a72be3b325ef207fdf16cdae1cdd9b0f3e349efd (patch) | |
tree | 31243e5321cf56d4d933942a8d4f9945c182f706 /Python/ast.c | |
parent | 52c4bec76bdcb962e883eac1e55f98df488b558c (diff) | |
download | cpython-a72be3b325ef207fdf16cdae1cdd9b0f3e349efd.zip cpython-a72be3b325ef207fdf16cdae1cdd9b0f3e349efd.tar.gz cpython-a72be3b325ef207fdf16cdae1cdd9b0f3e349efd.tar.bz2 |
when no module is given in a 'from' relative import, make ImportFrom.module NULL
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/ast.c b/Python/ast.c index 4a85164..6ccd02f 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -2440,7 +2440,7 @@ ast_for_import_stmt(struct compiling *c, const node *n) 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 @@ ast_for_import_stmt(struct compiling *c, const node *n) } if (mod != NULL) modname = mod->name; - else - modname = new_identifier("", c->c_arena); return ImportFrom(modname, aliases, ndots, lineno, col_offset, c->c_arena); } |