Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
611e6b5
Correct the description of ModuleSpec attributes
geryogam Oct 20, 2018
7113766
Update the description of the `submodule_search_locations` and `cache…
geryogam Oct 21, 2018
11ed136
Correct a typo
geryogam Oct 21, 2018
9a8d8e6
Fix and improve wording
geryogam Nov 26, 2018
859ff69
Document the read-only property for spec.parent
geryogam Nov 26, 2018
1f63f5b
Add information on the loader_state and has_location attributes
geryogam Dec 2, 2018
98fdbf7
Update importlib.rst
geryogam May 2, 2019
ac69aa1
Apply suggestions from code review
geryogam Jun 1, 2019
8bbdb64
Update importlib.rst
geryogam Jun 4, 2019
e126a5e
Update importlib.rst
geryogam Jun 4, 2019
7b7eb9d
Update importlib.rst
geryogam Jun 30, 2019
5290628
Update importlib.rst
geryogam Jun 30, 2019
89efbff
Update importlib.rst
geryogam Jun 30, 2019
8ba8ede
Apply suggestions from code review
geryogam Jul 13, 2019
2b7b6aa
Update import.rst
geryogam Jul 13, 2019
c71487c
Update import.rst
geryogam Jul 13, 2019
d7e66f6
Update import.rst
geryogam Jul 13, 2019
2123bb0
Update import.rst
geryogam Jul 13, 2019
3abaa63
Update importlib.rst
geryogam Jul 13, 2019
084915d
Update importlib.rst
geryogam Jul 13, 2019
88d2674
Update import.rst
geryogam Jul 13, 2019
37a5b86
Merge branch 'master' into patch-1
geryogam Aug 6, 2019
ee0625a
Apply suggestions from code review
geryogam Aug 9, 2019
cd0edda
Update importlib.rst
geryogam Aug 9, 2019
8957275
Remove changes to the language reference (to do in another PR)
geryogam Aug 9, 2019
9147e5c
Update importlib.rst
geryogam Aug 9, 2019
779a2f1
Update importlib.rst
geryogam Aug 10, 2019
ff0d5ae
Apply suggestions from code review
geryogam Aug 10, 2019
e651eb7
Update importlib.rst
geryogam Aug 10, 2019
9e8c67f
Apply suggestions from code review
geryogam Aug 10, 2019
d79b79a
Update Doc/library/importlib.rst
geryogam Sep 11, 2019
50cd998
Update importlib.rst
geryogam Sep 11, 2019
55e038d
Update importlib.rst
geryogam Sep 11, 2019
e8aa313
Update importlib.rst
geryogam Oct 23, 2020
51812a6
Update importlib.rst
geryogam Oct 24, 2020
3899dfa
Update importlib.rst
geryogam Oct 24, 2020
0a2790d
Merge branch 'master' into patch-1
geryogam Oct 24, 2020
ce8d9ac
Update Doc/library/importlib.rst
geryogam Jul 23, 2021
0cc0b11
Update Doc/library/importlib.rst
geryogam Jul 23, 2021
69d187d
Update importlib.rst
geryogam Jul 23, 2021
3461332
Update importlib.rst
geryogam Jul 29, 2021
19b0542
Apply suggestions from code review
geryogam Jul 29, 2021
5094cc5
Update importlib.rst
geryogam Jul 29, 2021
7bd4866
Update importlib.rst
geryogam Jul 29, 2021
fc40bb0
Update importlib.rst
geryogam Jul 29, 2021
60dc201
Update importlib.rst
geryogam Jul 29, 2021
fcea8dd
Update Doc/library/importlib.rst
brettcannon Nov 16, 2021
2bb2c14
Update Doc/library/importlib.rst
brettcannon Nov 16, 2021
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
Prev Previous commit
Next Next commit
Update import.rst
  • Loading branch information
geryogam authored Jul 13, 2019
commit 2123bb0d3d9f903c07b42c994e1c9d868a1f2d80
24 changes: 12 additions & 12 deletions Doc/reference/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ the module.
The ``__name__`` attribute must be set to the fully-qualified name of
the module. This name is used to uniquely identify the module in
the import system.

Comment thread
geryogam marked this conversation as resolved.
``__name__`` is set to ``'__main__'`` for non-package modules run
Comment thread
geryogam marked this conversation as resolved.
Outdated
from the file system, non-package modules run from standard input
and non-package modules run from the module namespace.
Expand Down Expand Up @@ -585,13 +585,13 @@ the module.
.. attribute:: __path__

If the module is a package, the ``__path__`` attribute must be set to an
iterable specifying the submodule search path within a package. If
iterable specifying the submodule search path within that package. If
``__path__`` is empty, it has no further significance. If ``__path__``
is not empty, it must produce strings when iterated over. More details
on the semantics of ``__path__`` are given
:ref:`below <package-path-rules>`.

``__path__`` is not set for non-package modules, packages run from the
``__path__`` is not set on non-package modules, packages run from the
file system and packages run from the module namespace.

.. attribute:: __file__
Expand All @@ -600,12 +600,12 @@ the module.
must be set to the location from which the module was imported. The
import system may opt to leave ``__file__`` unset if it has no
semantic meaning (e.g. a module loaded from a database).
``__file__`` is set to the relative path to the code for modules run
from the file system, the absolute path to the code for imported

``__file__`` is set to the relative path to the code on modules run
from the file system, the absolute path to the code on imported
modules and modules run from the module namespace and ``'<stdin>'``
for non-package modules run from standard input. ``__file__`` is
not set for imported namespace packages, imported built-in modules
on non-package modules run from standard input. ``__file__`` is
not set on imported namespace packages, imported built-in modules
and imported frozen modules.

.. attribute:: __cached__
Expand All @@ -620,11 +620,11 @@ the module.
of ``__file__`` and/or ``__cached__``. So if a loader can load from a
cached module but otherwise does not load from a file, that atypical
scenario may be appropriate.
``__cached__`` is set to the relative path to the compiled code for

``__cached__`` is set to the relative path to the compiled code on
packages run from the file system and the absolute path to the
compiled code for imported modules and modules run from the module
namespace. ``__cached__`` is not set for non-package modules run from
compiled code on imported modules and modules run from the module
namespace. ``__cached__`` is not set on non-package modules run from
the file system, non-package modules run from standard input, imported
namespace packages, imported built-in modules and imported frozen
modules.
Expand Down