summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-12 18:05:20 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-12 18:05:20 (GMT)
commite6bcc9145e3ecae592dd2e24da5508f34022b920 (patch)
tree407b0d02ac1d4e16d0d30d6b2795d4d1345201d2 /Doc/tutorial
parentc73728373c767119271e3813b3f4d182c845a297 (diff)
downloadcpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.zip
cpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.tar.gz
cpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.tar.bz2
Remove many "versionchanged" items that didn't use the official markup,
but just some text embedded in the docs. Also remove paragraph about implicit relative imports from tutorial.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/errors.rst3
-rw-r--r--Doc/tutorial/modules.rst25
2 files changed, 8 insertions, 20 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index cedffd5..a9687e5 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -344,8 +344,7 @@ occurred in the :keyword:`try` clause and has not been handled by an
been executed. The :keyword:`finally` clause is also executed "on the way out"
when any other clause of the :keyword:`try` statement is left via a
:keyword:`break`, :keyword:`continue` or :keyword:`return` statement. A more
-complicated example (having :keyword:`except` and :keyword:`finally` clauses in
-the same :keyword:`try` statement works as of Python 2.5)::
+complicated example::
>>> def divide(x, y):
... try:
diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst
index 279afc8..eee989f 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -493,35 +493,24 @@ packages.
Intra-package References
------------------------
-The submodules often need to refer to each other. For example, the
-:mod:`surround` module might use the :mod:`echo` module. In fact, such
-references are so common that the :keyword:`import` statement first looks in the
-containing package before looking in the standard module search path. Thus, the
-:mod:`surround` module can simply use ``import echo`` or ``from echo import
-echofilter``. If the imported module is not found in the current package (the
-package of which the current module is a submodule), the :keyword:`import`
-statement looks for a top-level module with the given name.
-
When packages are structured into subpackages (as with the :mod:`sound` package
in the example), you can use absolute imports to refer to submodules of siblings
packages. For example, if the module :mod:`sound.filters.vocoder` needs to use
the :mod:`echo` module in the :mod:`sound.effects` package, it can use ``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 ``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 :mod:`surround` module for example, you might use::
+You can also write relative imports, with the ``from module import name`` form
+of import statement. These imports use leading dots to indicate the current and
+parent packages involved in the relative import. From the :mod:`surround`
+module for example, you might use::
from . import echo
from .. import formats
from ..filters import equalizer
-Note that both explicit and implicit relative imports are based on the name of
-the current module. Since the name of the main module is always ``"__main__"``,
-modules intended for use as the main module of a Python application should
-always use absolute imports.
+Note that relative imports are based on the name of the current module. Since
+the name of the main module is always ``"__main__"``, modules intended for use
+as the main module of a Python application must always use absolute imports.
Packages in Multiple Directories