summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-07-11 10:18:10 (GMT)
committerGeorg Brandl <georg@python.org>2009-07-11 10:18:10 (GMT)
commit7c150bf904220c9280f4cc4d6c2d58128a48324b (patch)
tree90b9b968049130c216a16bfe158b905b911cef06
parent0294de028f1d5ca224c7abcb5223c13ff07aa943 (diff)
downloadcpython-7c150bf904220c9280f4cc4d6c2d58128a48324b.zip
cpython-7c150bf904220c9280f4cc4d6c2d58128a48324b.tar.gz
cpython-7c150bf904220c9280f4cc4d6c2d58128a48324b.tar.bz2
#6448: clarify docs for find_module().
-rw-r--r--Doc/library/imp.rst21
1 files changed, 11 insertions, 10 deletions
diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst
index 1d3c2f6..cf4655b 100644
--- a/Doc/library/imp.rst
+++ b/Doc/library/imp.rst
@@ -34,16 +34,17 @@ This module provides an interface to the mechanisms used to implement the
.. function:: find_module(name[, path])
- Try to find the module *name* on the search path *path*. If *path* is a list
- of directory names, each directory is searched for files with any of the
- suffixes returned by :func:`get_suffixes` above. Invalid names in the list
- are silently ignored (but all list items must be strings). If *path* is
- omitted or ``None``, the list of directory names given by ``sys.path`` is
- searched, but first it searches a few special places: it tries to find a
- built-in module with the given name (:const:`C_BUILTIN`), then a frozen
- module (:const:`PY_FROZEN`), and on some systems some other places are looked
- in as well (on Windows, it looks in the registry which may point to a
- specific file).
+ Try to find the module *name*. If *path* is omitted or ``None``, the list of
+ directory names given by ``sys.path`` is searched, but first a few special
+ places are searched: the function tries to find a built-in module with the
+ given name (:const:`C_BUILTIN`), then a frozen module (:const:`PY_FROZEN`),
+ and on some systems some other places are looked in as well (on Windows, it
+ looks in the registry which may point to a specific file).
+
+ Otherwise, *path* must be a list of directory names; each directory is
+ searched for files with any of the suffixes returned by :func:`get_suffixes`
+ above. Invalid names in the list are silently ignored (but all list items
+ must be strings).
If search is successful, the return value is a 3-element tuple ``(file,
pathname, description)``: