Do not refer to "sub-modules" since that is not a defined term.

This commit is contained in:
Fred Drake 2001-03-06 07:34:00 +00:00
parent ac79e95167
commit 859eb62108
1 changed files with 8 additions and 7 deletions

View File

@ -548,13 +548,14 @@ this execution terminate step (1).
When step (1) finishes without raising an exception, step (2) can When step (1) finishes without raising an exception, step (2) can
begin. begin.
The first form of \keyword{import} statement binds the module name in the The first form of \keyword{import} statement binds the module name in
local namespace to the module object, and then goes on to import the the local namespace to the module object, and then goes on to import
next identifier, if any. If the module name is followed by \keyword{as}, the next identifier, if any. If the module name is followed by
the name following \keyword{as} is used as the local name for the module. To \keyword{as}, the name following \keyword{as} is used as the local
avoid confusion, you cannot import sub-modules 'as' a different name for the module. To avoid confusion, you cannot import modules
local name. So 'import module as m' is legal, but 'import module.submod as with dotted names \keyword{as} a different local name. So \code{import
s' is not. The latter should be written as 'from module import submod as s', 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. see below.
The \keyword{from} form does not bind the module name: it goes through the The \keyword{from} form does not bind the module name: it goes through the