diff options
author | Brett Cannon <brett@python.org> | 2014-05-30 18:55:29 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-05-30 18:55:29 (GMT) |
commit | 2a17bde930af72995a217f6625d763e828bf5ce1 (patch) | |
tree | e36ddef450d49c50b324d5e2741161f9ea22188c /Doc/library/types.rst | |
parent | c8f0d6ebfc8e114d72c9e642ed33ebb93276427d (diff) | |
download | cpython-2a17bde930af72995a217f6625d763e828bf5ce1.zip cpython-2a17bde930af72995a217f6625d763e828bf5ce1.tar.gz cpython-2a17bde930af72995a217f6625d763e828bf5ce1.tar.bz2 |
Issue #20383: Introduce importlib.util.module_from_spec().
Along the way, dismantle importlib._bootstrap._SpecMethods as it was
no longer relevant and constructing the new function required
partially dismantling the class anyway.
Diffstat (limited to 'Doc/library/types.rst')
-rw-r--r-- | Doc/library/types.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/types.rst b/Doc/library/types.rst index abdb939..34fffe6 100644 --- a/Doc/library/types.rst +++ b/Doc/library/types.rst @@ -115,6 +115,10 @@ Standard names are defined for the following types: The type of :term:`modules <module>`. Constructor takes the name of the module to be created and optionally its :term:`docstring`. + .. note:: + Use :func:`importlib.util.module_from_spec` to create a new module if you + wish to set the various import-controlled attributes. + .. attribute:: __doc__ The :term:`docstring` of the module. Defaults to ``None``. |