Merged revisions 67077 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67077 | benjamin.peterson | 2008-11-03 09:14:51 -0600 (Mon, 03 Nov 2008) | 1 line
#4048 make the parser module accept relative imports as valid
........
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index 423a0b3..bea78c2 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -1879,10 +1879,10 @@
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 ')' |