Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Doc/library/imp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
module found.

If the module does not live in a file, the returned *file* is ``None``,
*pathname* is the empty string, and the *description* tuple contains empty
strings for its suffix and mode; the module type is indicated as given in
parentheses above. If the search is unsuccessful, :exc:`ImportError` is
raised. Other exceptions indicate problems with the arguments or
environment.
If the module is built-in or frozen then *file* and *pathname* are both ``None``
and the *description* tuple contains empty strings for its suffix and mode;
the module type is indicated as given in parentheses above. If the search
is unsuccessful, :exc:`ImportError` is raised. Other exceptions indicate
problems with the arguments or environment.

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`.
Expand Down