diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2014-05-13 00:25:00 (GMT) |
---|---|---|
committer | Eric Snow <ericsnowcurrently@gmail.com> | 2014-05-13 00:25:00 (GMT) |
commit | b7f1be309eb7d2deceb8b6c3f3a4de1e4dcbbe11 (patch) | |
tree | 657316c7a5016968c0e031e057250a5670db388e /Doc/c-api | |
parent | 38d3d22b29abed5a92166b86dddbbc575cf4ae02 (diff) | |
parent | 08197a4616f6294e21672fd8ebb5da7ce956c8e5 (diff) | |
download | cpython-b7f1be309eb7d2deceb8b6c3f3a4de1e4dcbbe11.zip cpython-b7f1be309eb7d2deceb8b6c3f3a4de1e4dcbbe11.tar.gz cpython-b7f1be309eb7d2deceb8b6c3f3a4de1e4dcbbe11.tar.bz2 |
Merge from 3.4 (for #21226).
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/import.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst index 0dcac2d..3641fc6 100644 --- a/Doc/c-api/import.rst +++ b/Doc/c-api/import.rst @@ -132,8 +132,14 @@ Importing Modules such modules have no way to know that the module object is an unknown (and probably damaged with respect to the module author's intents) state. + The module's :attr:`__spec__` and :attr:`__loader__` will be set, if + not set already, with the appropriate values. The spec's loader will + be set to the module's ``__loader__`` (if set) and to an instance of + :class:`SourceFileLoader` otherwise. + The module's :attr:`__file__` attribute will be set to the code object's - :c:member:`co_filename`. + :c:member:`co_filename`. If applicable, :attr:`__cached__` will also + be set. This function will reload the module if it was already imported. See :c:func:`PyImport_ReloadModule` for the intended way to reload a module. |