]> granicus.if.org Git - python/commitdiff
Fix #1488915, Multiple dots in relative import statement raise SyntaxError.
authorThomas Wouters <thomas@python.org>
Thu, 25 May 2006 11:25:51 +0000 (11:25 +0000)
committerThomas Wouters <thomas@python.org>
Thu, 25 May 2006 11:25:51 +0000 (11:25 +0000)
Grammar/Grammar

index 8f248eff4acce27e1ae159158fcd28d7535c11ce..c3709d2d14f3fdd93ed75fad4921c5896604224f 100644 (file)
@@ -62,7 +62,7 @@ yield_stmt: yield_expr
 raise_stmt: 'raise' [test [',' test [',' test]]]
 import_stmt: import_name | import_from
 import_name: 'import' dotted_as_names
-import_from: ('from' ('.'* dotted_name | '.')
+import_from: ('from' ('.'* dotted_name | '.'+)
               'import' ('*' | '(' import_as_names ')' | import_as_names))
 import_as_name: NAME [('as' | NAME) NAME]
 dotted_as_name: dotted_name [('as' | NAME) NAME]