summaryrefslogtreecommitdiffstats
path: root/Doc/library/importlib.rst
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-07-18 13:14:57 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-07-18 13:14:57 (GMT)
commit76e077001d9c593faaec1aa5187dd7870cb4481c (patch)
tree8ac59cf5a5321a0cef8cdf56a4681cf46969cb73 /Doc/library/importlib.rst
parent90db661b4335eaf7a3cb5e9a4524ae9707eeaf76 (diff)
downloadcpython-76e077001d9c593faaec1aa5187dd7870cb4481c.zip
cpython-76e077001d9c593faaec1aa5187dd7870cb4481c.tar.gz
cpython-76e077001d9c593faaec1aa5187dd7870cb4481c.tar.bz2
Close #15387: inspect.getmodulename() now uses a new importlib.machinery.all_suffixes() API rather than the deprecated inspect.getmoduleinfo()
Diffstat (limited to 'Doc/library/importlib.rst')
-rw-r--r--Doc/library/importlib.rst13
1 files changed, 12 insertions, 1 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index cea2da0..daf9e56 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -533,12 +533,23 @@ find and load modules.
.. attribute:: EXTENSION_SUFFIXES
- A list of strings representing the the recognized file suffixes for
+ A list of strings representing the recognized file suffixes for
extension modules.
.. versionadded:: 3.3
+.. func:: all_suffixes()
+
+ Returns a combined list of strings representing all file suffixes for
+ Python modules recognized by the standard import machinery. This is a
+ helper for code which simply needs to know if a filesystem path
+ potentially represents a Python module (for example,
+ :func:`inspect.getmodulename`)
+
+ .. versionadded:: 3.3
+
+
.. class:: BuiltinImporter
An :term:`importer` for built-in modules. All known built-in modules are