summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/import.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-21 11:51:00 (GMT)
committerGitHub <noreply@github.com>2023-07-21 11:51:00 (GMT)
commitffc7678f4683a63180c1321334c76e9b3e09b0a5 (patch)
treed30f26c7bf420a4c41b656b2e3e8e8c48a9242cf /Doc/c-api/import.rst
parent84e52171b541ecc01f2d738cf82f5d4199a4bce7 (diff)
downloadcpython-ffc7678f4683a63180c1321334c76e9b3e09b0a5.zip
cpython-ffc7678f4683a63180c1321334c76e9b3e09b0a5.tar.gz
cpython-ffc7678f4683a63180c1321334c76e9b3e09b0a5.tar.bz2
[3.12] gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894) (GH-106954)
(cherry picked from commit d036db728ea3d54509cbad06df74e2d9a31fbec8)
Diffstat (limited to 'Doc/c-api/import.rst')
-rw-r--r--Doc/c-api/import.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst
index 79843ba..d32c09e 100644
--- a/Doc/c-api/import.rst
+++ b/Doc/c-api/import.rst
@@ -126,9 +126,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.