mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
SF patch #1007189, multi-line imports, for instance:
"from blah import (foo, bar baz, bongo)"
This commit is contained in:
parent
876032e570
commit
1a4ddaecc7
14 changed files with 1394 additions and 1181 deletions
|
@ -623,6 +623,9 @@ It continues with the next cycle of the nearest enclosing loop.
|
|||
\productioncont{| "from" \token{module} "import" \token{identifier}
|
||||
["as" \token{name}]}
|
||||
\productioncont{ ( "," \token{identifier} ["as" \token{name}] )*}
|
||||
\productioncont{| "from" \token{module} "import" "(" \token{identifier}
|
||||
["as" \token{name}]}
|
||||
\productioncont{ ( "," \token{identifier} ["as" \token{name}] )* [","] ")"}
|
||||
\productioncont{| "from" \token{module} "import" "*"}
|
||||
\production{module}
|
||||
{(\token{identifier} ".")* \token{identifier}}
|
||||
|
@ -744,8 +747,8 @@ before the release in which the feature becomes standard.
|
|||
|
||||
\begin{productionlist}[*]
|
||||
\production{future_statement}
|
||||
{"from" "__future__" "import" feature ["as" name]}
|
||||
\productioncont{("," feature ["as" name])*}
|
||||
{"from" "__future__" "import" feature ["as" name] ("," feature ["as" name])*}
|
||||
\productioncont{| "from" "__future__" "import" "(" feature ["as" name] ("," feature ["as" name])* [","] ")"}
|
||||
\production{feature}{identifier}
|
||||
\production{name}{identifier}
|
||||
\end{productionlist}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue