Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0c1f1b

Browse files
committed
Note the sole case in which the ban on "from ... import *" within a
function is enforced.
1 parent 15b6897 commit f0c1f1b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Doc/ref/ref6.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,11 @@ \section{The \keyword{import} statement \label{import}}
680680
module's namespace which do not begin with an underscore character
681681
(\character{_}).
682682
683-
The \keyword{from} form with \samp{*} may only occur in a module scope.
683+
The \keyword{from} form with \samp{*} may only occur in a module
684+
scope. If the wild card form of import --- \samp{import *} --- is
685+
used in a function and the function contains or is a nested block with
686+
free variables, the compiler will raise a \exception{SyntaxError}.
687+
684688
\kwindex{from}
685689
\stindex{from}
686690

0 commit comments

Comments
 (0)