From: Thomas Wouters Date: Thu, 25 May 2006 11:25:51 +0000 (+0000) Subject: Fix #1488915, Multiple dots in relative import statement raise SyntaxError. X-Git-Tag: v2.5b1~546 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf8229ea3b0c0f56d261074bd9eb18b459ff8a8a;p=python Fix #1488915, Multiple dots in relative import statement raise SyntaxError. --- diff --git a/Grammar/Grammar b/Grammar/Grammar index 8f248eff4a..c3709d2d14 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -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]