Commit 52c0c368 authored by Georg Brandl's avatar Georg Brandl

Bug #1769002: fix a now-wrong sentence in the tutorial.

parent e7fe6c3d
...@@ -2966,15 +2966,14 @@ which the current module is a submodule), the \keyword{import} ...@@ -2966,15 +2966,14 @@ which the current module is a submodule), the \keyword{import}
statement looks for a top-level module with the given name. statement looks for a top-level module with the given name.
When packages are structured into subpackages (as with the When packages are structured into subpackages (as with the
\module{sound} package in the example), there's no shortcut to refer \module{sound} package in the example), you can use absolute
to submodules of sibling packages - the full name of the subpackage imports to refer to submodules of siblings packages.
must be used. For example, if the module For example, if the module \module{sound.filters.vocoder} needs to
\module{sound.filters.vocoder} needs to use the \module{echo} module use the \module{echo} module in the \module{sound.effects} package,
in the \module{sound.effects} package, it can use \code{from it can use \code{from sound.effects import echo}.
sound.effects import echo}.
Starting with Python 2.5, in addition to the implicit relative imports 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 \code{from module import name} form of import statement. These explicit
relative imports use leading dots to indicate the current and parent relative imports use leading dots to indicate the current and parent
packages involved in the relative import. From the \module{surround} packages involved in the relative import. From the \module{surround}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment