]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35181: Correct importlib documentation for some module attributes (GH-15190)
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 21 Oct 2020 21:39:41 +0000 (14:39 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Oct 2020 21:39:41 +0000 (14:39 -0700)
commit6e842bcdf8a47fe081c9f2edc2b8875e1f3e2f18
tree5e2521808d8af7503fa2d376cb746c1c3d95e91c
parent224ed378b9aadad9dbbd890064677433188aecd9
bpo-35181: Correct importlib documentation for some module attributes (GH-15190)

@ericsnowcurrently This PR will change the following:

In the library documentation importlib.rst:

- `module.__package__` can be `module.__name__` for packages;
- `spec.parent` can be `spec.__name__` for packages;
- `spec.loader` is not `None` for namespaces packages.

In the language documentation import.rst:

- `spec.loader` is not `None` for namespace packages.

Automerge-Triggered-By: GH:warsaw
(cherry picked from commit 27f1bd8787d24ac53cc3dc6ea5eb00b8a3499839)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Doc/library/importlib.rst
Doc/reference/import.rst