gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894)

This commit is contained in:
Serhiy Storchaka 2023-07-21 12:34:30 +03:00 committed by GitHub
parent 8d397ee825
commit d036db728e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 111 additions and 111 deletions

View file

@ -142,9 +142,9 @@ Importing Modules
read from a Python bytecode file or obtained from the built-in function
:func:`compile`, load the module. Return a new reference to the module object,
or ``NULL`` with an exception set if an error occurred. *name*
is removed from :attr:`sys.modules` in error cases, even if *name* was already
in :attr:`sys.modules` on entry to :c:func:`PyImport_ExecCodeModule`. Leaving
incompletely initialized modules in :attr:`sys.modules` is dangerous, as imports of
is removed from :data:`sys.modules` in error cases, even if *name* was already
in :data:`sys.modules` on entry to :c:func:`PyImport_ExecCodeModule`. Leaving
incompletely initialized modules in :data:`sys.modules` is dangerous, as imports of
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.