#4048 make the parser module accept relative imports as valid

This commit is contained in:
Benjamin Peterson 2008-11-03 15:14:51 +00:00
parent 8928a7e911
commit 6624a9fddd
4 changed files with 7 additions and 2 deletions

View file

@ -1879,10 +1879,10 @@ static int
count_from_dots(node *tree)
{
int i;
for (i = 0; i < NCH(tree); i++)
for (i = 1; i < NCH(tree); i++)
if (TYPE(CHILD(tree, i)) != DOT)
break;
return i;
return i-1;
}
/* 'from' ('.'* dotted_name | '.') 'import' ('*' | '(' import_as_names ')' |