diff options
author | Brett Cannon <brett@python.org> | 2012-08-10 17:47:54 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-08-10 17:47:54 (GMT) |
commit | ac9f2f3de31787a016a1220b304db388dc1705e9 (patch) | |
tree | 781ab74268b6ca9c6ab18ec71d0c1b0aa7a6d9c9 /Doc | |
parent | f4dc9204cc406ab41c2d643c1a64375a6a2954e5 (diff) | |
download | cpython-ac9f2f3de31787a016a1220b304db388dc1705e9.zip cpython-ac9f2f3de31787a016a1220b304db388dc1705e9.tar.gz cpython-ac9f2f3de31787a016a1220b304db388dc1705e9.tar.bz2 |
Issue #15576: Allow extension modules to be a package's __init__
module again. Also took the opportunity to stop accidentally exporting
_imp.extension_suffixes() as public.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/importlib.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index d528a0d..4cdb4f2 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -671,9 +671,8 @@ find and load modules. The *path* argument is the directory for which the finder is in charge of searching. - The *loader_details* argument is a variable number of 3-item tuples each - containing a loader, file suffixes the loader recognizes, and a boolean - representing whether the loader handles packages. + The *loader_details* argument is a variable number of 2-item tuples each + containing a loader and a sequence of file suffixes the loader recognizes. The finder will cache the directory contents as necessary, making stat calls for each module search to verify the cache is not outdated. Because cache @@ -798,7 +797,8 @@ find and load modules. .. method:: is_package(fullname) - Returns ``False`` as extension modules can never be packages. + Returns ``True`` if the file path points to a package's ``__init__`` + module based on :attr:`EXTENSION_SUFFIXES`. .. method:: get_code(fullname) |