bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040)

(cherry picked from commit 967b84c913)

Co-authored-by: Windson yang <wiwindson@outlook.com>
This commit is contained in:
Miss Islington (bot) 2019-09-12 05:25:54 -07:00 committed by GitHub
parent 80e33655a2
commit 14afe203d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -66,12 +66,11 @@ This module provides an interface to the mechanisms used to implement the
contained in the list returned by :func:`get_suffixes` describing the kind of contained in the list returned by :func:`get_suffixes` describing the kind of
module found. module found.
If the module does not live in a file, the returned *file* is ``None``, If the module is built-in or frozen then *file* and *pathname* are both ``None``
*pathname* is the empty string, and the *description* tuple contains empty and the *description* tuple contains empty strings for its suffix and mode;
strings for its suffix and mode; the module type is indicated as given in the module type is indicated as given in parentheses above. If the search
parentheses above. If the search is unsuccessful, :exc:`ImportError` is is unsuccessful, :exc:`ImportError` is raised. Other exceptions indicate
raised. Other exceptions indicate problems with the arguments or problems with the arguments or environment.
environment.
If the module is a package, *file* is ``None``, *pathname* is the package If the module is a package, *file* is ``None``, *pathname* is the package
path and the last item in the *description* tuple is :const:`PKG_DIRECTORY`. path and the last item in the *description* tuple is :const:`PKG_DIRECTORY`.