]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
changed import to support NAME.NAME...NAME
authorGuido van Rossum <guido@python.org>
Sat, 7 Jan 1995 10:25:36 +0000 (10:25 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 7 Jan 1995 10:25:36 +0000 (10:25 +0000)
Grammar/Grammar

index 1e9ce77530dbf2184c5bd1a22ae8234fd8b84407..5af4483acfa65218fcb32659046ba7c0c9ce0054 100644 (file)
@@ -40,7 +40,8 @@ break_stmt: 'break'
 continue_stmt: 'continue'
 return_stmt: 'return' [testlist]
 raise_stmt: 'raise' test [',' test]
-import_stmt: 'import' NAME (',' NAME)* | 'from' NAME 'import' ('*' | NAME (',' NAME)*)
+import_stmt: 'import' dotted_name (',' dotted_name)* | 'from' dotted_name 'import' ('*' | NAME (',' NAME)*)
+dotted_name: NAME ('.' NAME)*
 global_stmt: 'global' NAME (',' NAME)*
 access_stmt: 'access' ('*' | NAME (',' NAME)*) ':' accesstype  (',' accesstype)*
 accesstype: NAME+