]> granicus.if.org Git - python/commitdiff
Note the sole case in which the ban on "from ... import *" within a
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 1 Apr 2002 21:19:44 +0000 (21:19 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 1 Apr 2002 21:19:44 +0000 (21:19 +0000)
function is enforced.

Doc/ref/ref6.tex

index 7dae88a994b6eaf04cd04337f3a7946f7ea9ed09..c78328ce2231e35a90180426a646785790983f1c 100644 (file)
@@ -680,7 +680,11 @@ defined, the set of public names includes all names found in the
 module's namespace which do not begin with an underscore character
 (\character{_}).
 
-The \keyword{from} form with \samp{*} may only occur in a module scope.
+The \keyword{from} form with \samp{*} may only occur in a module
+scope.  If the wild card form of import --- \samp{import *} --- is
+used in a function and the function contains or is a nested block with
+free variables, the compiler will raise a \exception{SyntaxError}.
+
 \kwindex{from}
 \stindex{from}