summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-03-06 07:34:00 (GMT)
committerFred Drake <fdrake@acm.org>2001-03-06 07:34:00 (GMT)
commit859eb621087ec5141f9ec73adb0fe10fcab49cb8 (patch)
tree5b2c99687f2b054148b6e4a8066b07796935f598
parentac79e95167572a5eb68d07ed477bca9dd3e532d3 (diff)
downloadcpython-859eb621087ec5141f9ec73adb0fe10fcab49cb8.zip
cpython-859eb621087ec5141f9ec73adb0fe10fcab49cb8.tar.gz
cpython-859eb621087ec5141f9ec73adb0fe10fcab49cb8.tar.bz2
Do not refer to "sub-modules" since that is not a defined term.
-rw-r--r--Doc/ref/ref6.tex15
1 files changed, 8 insertions, 7 deletions
diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex
index 31769f7..d61165f 100644
--- a/Doc/ref/ref6.tex
+++ b/Doc/ref/ref6.tex
@@ -548,13 +548,14 @@ this execution terminate step (1).
When step (1) finishes without raising an exception, step (2) can
begin.
-The first form of \keyword{import} statement binds the module name in the
-local namespace to the module object, and then goes on to import the
-next identifier, if any. If the module name is followed by \keyword{as},
-the name following \keyword{as} is used as the local name for the module. To
-avoid confusion, you cannot import sub-modules 'as' a different
-local name. So 'import module as m' is legal, but 'import module.submod as
-s' is not. The latter should be written as 'from module import submod as s',
+The first form of \keyword{import} statement binds the module name in
+the local namespace to the module object, and then goes on to import
+the next identifier, if any. If the module name is followed by
+\keyword{as}, the name following \keyword{as} is used as the local
+name for the module. To avoid confusion, you cannot import modules
+with dotted names \keyword{as} a different local name. So \code{import
+module as m} is legal, but \code{import module.submod as s} is not.
+The latter should be written as \code{from module import submod as s};
see below.
The \keyword{from} form does not bind the module name: it goes through the