Skip to content

Commit 8615a75

Browse files
committed
Docs: address review feedback on interned string immortality
1 parent 60877e6 commit 8615a75

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Doc/c-api/unicode.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,11 +1750,12 @@ They all return ``NULL`` or ``-1`` if an exception occurs.
17501750
:c:expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not,
17511751
then -- as with any other error -- the argument is left unchanged.
17521752
1753-
Interned strings are not :term:`immortal`.
1753+
Strings interned by this function are not :term:`immortal`.
17541754
You must keep a reference to the result to benefit from interning.
17551755
17561756
.. note::
1757-
In the free-threaded build, all interned strings **are** :term:`immortal`.
1757+
On the :term:`free threaded` build, all interned strings are :term:`immortal`.
1758+
This may change in the future.
17581759
17591760
.. c:function:: PyObject* PyUnicode_InternFromString(const char *str)
17601761

Doc/howto/free-threading-python.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This section describes known limitations of the free-threaded CPython build.
9999
Immortalization
100100
---------------
101101

102-
The free-threaded build introduces additional :term:`immortal` objects.
102+
On the free-threaded build, more objects are made immortal.
103103
Immortal objects are not deallocated and have reference counts that are
104104
never modified. This is done to avoid reference count contention that would
105105
prevent efficient multi-threaded scaling.

Doc/library/sys.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,8 +1326,8 @@ always available. Unless explicitly noted otherwise, all variables are read-only
13261326
return value of :func:`intern` around to benefit from it.
13271327

13281328
.. note::
1329-
1330-
In the free-threaded build, all interned strings **are** :term:`immortal`.
1329+
On the :term:`free threaded` build, all interned strings are :term:`immortal`.
1330+
This may change in the future.
13311331

13321332
.. function:: _is_gil_enabled()
13331333

0 commit comments

Comments
 (0)