summaryrefslogtreecommitdiffstats
path: root/Doc/ref
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-04-01 21:19:44 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-04-01 21:19:44 (GMT)
commitf0c1f1badb9e4147cb7e87f6b6813184ce3ae26a (patch)
tree9ba5f57cb2fe0df6218c717ca4f6ef0ee0b77e54 /Doc/ref
parent15b68976da65bc3827a6783e36d13248f2dc7e6f (diff)
downloadcpython-f0c1f1badb9e4147cb7e87f6b6813184ce3ae26a.zip
cpython-f0c1f1badb9e4147cb7e87f6b6813184ce3ae26a.tar.gz
cpython-f0c1f1badb9e4147cb7e87f6b6813184ce3ae26a.tar.bz2
Note the sole case in which the ban on "from ... import *" within a
function is enforced.
Diffstat (limited to 'Doc/ref')
-rw-r--r--Doc/ref/ref6.tex6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex
index 7dae88a..c78328c 100644
--- a/Doc/ref/ref6.tex
+++ b/Doc/ref/ref6.tex
@@ -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}