]> 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:27:10 +0000 (14:27 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Oct 2020 21:27:10 +0000 (14:27 -0700)
commit916ac9520108831d2099b13992a45884b112b193
treeda87b69166b04aff4336a2a3ac386e9606921e04
parentba666747af83aa465ffa8b55efbbb7f992647e12
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