[Python-checkins] r56798 - python/branches/release25-maint/Doc/tut/tut.tex
georg.brandl
python-checkins at python.org
Tue Aug 7 09:13:28 CEST 2007
Author: georg.brandl
Date: Tue Aug 7 09:13:27 2007
New Revision: 56798
Modified:
python/branches/release25-maint/Doc/tut/tut.tex
Log:
Bug #1769002: fix a now-wrong sentence in the tutorial.
(backport from rev. 56797)
Modified: python/branches/release25-maint/Doc/tut/tut.tex
==============================================================================
--- python/branches/release25-maint/Doc/tut/tut.tex (original)
+++ python/branches/release25-maint/Doc/tut/tut.tex Tue Aug 7 09:13:27 2007
@@ -2966,15 +2966,14 @@
statement looks for a top-level module with the given name.
When packages are structured into subpackages (as with the
-\module{sound} package in the example), there's no shortcut to refer
-to submodules of sibling packages - the full name of the subpackage
-must be used. For example, if the module
-\module{sound.filters.vocoder} needs to use the \module{echo} module
-in the \module{sound.effects} package, it can use \code{from
-sound.effects import echo}.
+\module{sound} package in the example), you can use absolute
+imports to refer to submodules of siblings packages.
+For example, if the module \module{sound.filters.vocoder} needs to
+use the \module{echo} module in the \module{sound.effects} package,
+it can use \code{from sound.effects import echo}.
Starting with Python 2.5, in addition to the implicit relative imports
-described above, you can write explicit relative imports with the
+described above, you can also write explicit relative imports with the
\code{from module import name} form of import statement. These explicit
relative imports use leading dots to indicate the current and parent
packages involved in the relative import. From the \module{surround}
More information about the Python-checkins
mailing list