Skip to content

Commit 3ca9264

Browse files
[3.11] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (#108290)
(cherry picked from commit d7202e4)
1 parent 80c7ae0 commit 3ca9264

27 files changed

+101
-92
lines changed

Doc/c-api/exceptions.rst

+9-5
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,21 @@ For convenience, some of these functions will always return a
211211
212212
.. c:function:: PyObject* PyErr_SetFromWindowsErrWithFilename(int ierr, const char *filename)
213213
214-
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the
215-
filename is given as a C string. *filename* is decoded from the filesystem
216-
encoding (:func:`os.fsdecode`).
214+
Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior
215+
that if *filename* is not ``NULL``, it is decoded from the filesystem
216+
encoding (:func:`os.fsdecode`) and passed to the constructor of
217+
:exc:`OSError` as a third parameter to be used to define the
218+
:attr:`!filename` attribute of the exception instance.
217219
218220
.. availability:: Windows.
219221
220222
221223
.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObject(PyObject *type, int ierr, PyObject *filename)
222224
223-
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an
224-
additional parameter specifying the exception type to be raised.
225+
Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional behavior
226+
that if *filename* is not ``NULL``, it is passed to the constructor of
227+
:exc:`OSError` as a third parameter to be used to define the
228+
:attr:`!filename` attribute of the exception instance.
225229
226230
.. availability:: Windows.
227231

Doc/c-api/init_config.rst

+4
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ PyWideStringList
8282
If *length* is non-zero, *items* must be non-``NULL`` and all strings must be
8383
non-``NULL``.
8484

85+
.. c:namespace:: NULL
86+
8587
Methods:
8688

8789
.. c:function:: PyStatus PyWideStringList_Append(PyWideStringList *list, const wchar_t *item)
@@ -101,6 +103,8 @@ PyWideStringList
101103
102104
Python must be preinitialized to call this function.
103105
106+
.. c:namespace:: PyWideStringList
107+
104108
Structure fields:
105109
106110
.. c:member:: Py_ssize_t length

Doc/c-api/module.rst

+2
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ The available slot types are:
338338
The *value* pointer of this slot must point to a function of the signature:
339339
340340
.. c:function:: PyObject* create_module(PyObject *spec, PyModuleDef *def)
341+
:noindex:
341342
342343
The function receives a :py:class:`~importlib.machinery.ModuleSpec`
343344
instance, as defined in :PEP:`451`, and the module definition.
@@ -372,6 +373,7 @@ The available slot types are:
372373
The signature of the function is:
373374
374375
.. c:function:: int exec_module(PyObject* module)
376+
:noindex:
375377
376378
If multiple ``Py_mod_exec`` slots are specified, they are processed in the
377379
order they appear in the *m_slots* array.

Doc/c-api/unicode.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ the user settings on the machine running the codec.
13911391
13921392
Encode the Unicode object using the specified code page and return a Python
13931393
bytes object. Return ``NULL`` if an exception was raised by the codec. Use
1394-
:c:macro:`CP_ACP` code page to get the MBCS encoder.
1394+
:c:macro:`!CP_ACP` code page to get the MBCS encoder.
13951395
13961396
.. versionadded:: 3.3
13971397

Doc/extending/newtypes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ have an associated doc string simply by providing the text in the table. An
323323
application can use the introspection API to retrieve the descriptor from the
324324
class object, and get the doc string using its :attr:`__doc__` attribute.
325325

326-
As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry with a :c:member:`~PyMethodDef.name` value
326+
As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry with a :c:member:`~PyMethodDef.ml_name` value
327327
of ``NULL`` is required.
328328

329329
.. XXX Descriptors need to be explained in more detail somewhere, but not here.

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Doc/c-api/structures.rst
2020
Doc/c-api/sys.rst
2121
Doc/c-api/type.rst
2222
Doc/c-api/typeobj.rst
23-
Doc/c-api/unicode.rst
2423
Doc/extending/extending.rst
2524
Doc/extending/newtypes.rst
2625
Doc/glossary.rst

Doc/whatsnew/2.2.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1078,17 +1078,17 @@ code, none of the changes described here will affect you very much.
10781078

10791079
To upgrade an extension module to the new API, perform the following steps:
10801080

1081-
* Rename :c:func:`Py_TPFLAGS_GC` to :c:func:`PyTPFLAGS_HAVE_GC`.
1081+
* Rename :c:macro:`!Py_TPFLAGS_GC` to :c:macro:`Py_TPFLAGS_HAVE_GC`.
10821082

10831083
* Use :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar` to allocate
10841084
objects, and :c:func:`PyObject_GC_Del` to deallocate them.
10851085

1086-
* Rename :c:func:`PyObject_GC_Init` to :c:func:`PyObject_GC_Track` and
1087-
:c:func:`PyObject_GC_Fini` to :c:func:`PyObject_GC_UnTrack`.
1086+
* Rename :c:func:`!PyObject_GC_Init` to :c:func:`PyObject_GC_Track` and
1087+
:c:func:`!PyObject_GC_Fini` to :c:func:`PyObject_GC_UnTrack`.
10881088

1089-
* Remove :c:func:`PyGC_HEAD_SIZE` from object size calculations.
1089+
* Remove :c:macro:`!PyGC_HEAD_SIZE` from object size calculations.
10901090

1091-
* Remove calls to :c:func:`PyObject_AS_GC` and :c:func:`PyObject_FROM_GC`.
1091+
* Remove calls to :c:func:`!PyObject_AS_GC` and :c:func:`!PyObject_FROM_GC`.
10921092

10931093
* A new ``et`` format sequence was added to :c:func:`PyArg_ParseTuple`; ``et``
10941094
takes both a parameter and an encoding name, and converts the parameter to the
@@ -1219,7 +1219,7 @@ Some of the more notable changes are:
12191219
operator, but these features were rarely used and therefore buggy. The
12201220
:meth:`tolist` method and the :attr:`start`, :attr:`stop`, and :attr:`step`
12211221
attributes are also being deprecated. At the C level, the fourth argument to
1222-
the :c:func:`PyRange_New` function, ``repeat``, has also been deprecated.
1222+
the :c:func:`!PyRange_New` function, ``repeat``, has also been deprecated.
12231223

12241224
* There were a bunch of patches to the dictionary implementation, mostly to fix
12251225
potential core dumps if a dictionary contains objects that sneakily changed

Doc/whatsnew/2.3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1897,7 +1897,7 @@ Changes to Python's build process and to the C API include:
18971897
but will also mean that you can't get help for Python's built-ins. (Contributed
18981898
by Gustavo Niemeyer.)
18991899

1900-
* The :c:func:`PyArg_NoArgs` macro is now deprecated, and code that uses it
1900+
* The :c:func:`!PyArg_NoArgs` macro is now deprecated, and code that uses it
19011901
should be changed. For Python 2.2 and later, the method definition table can
19021902
specify the :c:macro:`METH_NOARGS` flag, signalling that there are no arguments,
19031903
and the argument checking can then be removed. If compatibility with pre-2.2

Doc/whatsnew/2.4.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ Some of the changes to Python's build process and to the C API are:
14681468
*X* is a NaN. (Contributed by Tim Peters.)
14691469

14701470
* C code can avoid unnecessary locking by using the new
1471-
:c:func:`PyEval_ThreadsInitialized` function to tell if any thread operations
1471+
:c:func:`!PyEval_ThreadsInitialized` function to tell if any thread operations
14721472
have been performed. If this function returns false, no lock operations are
14731473
needed. (Contributed by Nick Coghlan.)
14741474

Doc/whatsnew/2.5.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -2119,9 +2119,9 @@ Changes to Python's build process and to the C API include:
21192119
the various AST nodes in :file:`Parser/Python.asdl`. A Python script reads this
21202120
file and generates a set of C structure definitions in
21212121
:file:`Include/Python-ast.h`. The :c:func:`PyParser_ASTFromString` and
2122-
:c:func:`PyParser_ASTFromFile`, defined in :file:`Include/pythonrun.h`, take
2122+
:c:func:`!PyParser_ASTFromFile`, defined in :file:`Include/pythonrun.h`, take
21232123
Python source as input and return the root of an AST representing the contents.
2124-
This AST can then be turned into a code object by :c:func:`PyAST_Compile`. For
2124+
This AST can then be turned into a code object by :c:func:`!PyAST_Compile`. For
21252125
more information, read the source code, and then ask questions on python-dev.
21262126

21272127
The AST code was developed under Jeremy Hylton's management, and implemented by
@@ -2172,7 +2172,7 @@ Changes to Python's build process and to the C API include:
21722172
``Py_LOCAL(type)`` declares the function as returning a value of the
21732173
specified *type* and uses a fast-calling qualifier.
21742174
``Py_LOCAL_INLINE(type)`` does the same thing and also requests the
2175-
function be inlined. If :c:func:`PY_LOCAL_AGGRESSIVE` is defined before
2175+
function be inlined. If macro :c:macro:`!PY_LOCAL_AGGRESSIVE` is defined before
21762176
:file:`python.h` is included, a set of more aggressive optimizations are enabled
21772177
for the module; you should benchmark the results to find out if these
21782178
optimizations actually make the code faster. (Contributed by Fredrik Lundh at
@@ -2181,7 +2181,7 @@ Changes to Python's build process and to the C API include:
21812181
* ``PyErr_NewException(name, base, dict)`` can now accept a tuple of base
21822182
classes as its *base* argument. (Contributed by Georg Brandl.)
21832183

2184-
* The :c:func:`PyErr_Warn` function for issuing warnings is now deprecated in
2184+
* The :c:func:`!PyErr_Warn` function for issuing warnings is now deprecated in
21852185
favour of ``PyErr_WarnEx(category, message, stacklevel)`` which lets you
21862186
specify the number of stack frames separating this function and the caller. A
21872187
*stacklevel* of 1 is the function calling :c:func:`PyErr_WarnEx`, 2 is the
@@ -2191,7 +2191,7 @@ Changes to Python's build process and to the C API include:
21912191
compiled with a C++ compiler without errors. (Implemented by Anthony Baxter,
21922192
Martin von Löwis, Skip Montanaro.)
21932193

2194-
* The :c:func:`PyRange_New` function was removed. It was never documented, never
2194+
* The :c:func:`!PyRange_New` function was removed. It was never documented, never
21952195
used in the core code, and had dangerously lax error checking. In the unlikely
21962196
case that your extensions were using it, you can replace it by something like
21972197
the following::

Doc/whatsnew/2.6.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ can be used to include Unicode characters::
977977
print len(s) # 12 Unicode characters
978978

979979
At the C level, Python 3.0 will rename the existing 8-bit
980-
string type, called :c:type:`PyStringObject` in Python 2.x,
980+
string type, called :c:type:`!PyStringObject` in Python 2.x,
981981
to :c:type:`PyBytesObject`. Python 2.6 uses ``#define``
982982
to support using the names :c:func:`PyBytesObject`,
983983
:c:func:`PyBytes_Check`, :c:func:`PyBytes_FromStringAndSize`,
@@ -3012,11 +3012,11 @@ Changes to Python's build process and to the C API include:
30123012
bug occurred if one thread closed a file object while another thread
30133013
was reading from or writing to the object. In 2.6 file objects
30143014
have a reference count, manipulated by the
3015-
:c:func:`PyFile_IncUseCount` and :c:func:`PyFile_DecUseCount`
3015+
:c:func:`!PyFile_IncUseCount` and :c:func:`!PyFile_DecUseCount`
30163016
functions. File objects can't be closed unless the reference count
3017-
is zero. :c:func:`PyFile_IncUseCount` should be called while the GIL
3017+
is zero. :c:func:`!PyFile_IncUseCount` should be called while the GIL
30183018
is still held, before carrying out an I/O operation using the
3019-
``FILE *`` pointer, and :c:func:`PyFile_DecUseCount` should be called
3019+
``FILE *`` pointer, and :c:func:`!PyFile_DecUseCount` should be called
30203020
immediately after the GIL is re-acquired.
30213021
(Contributed by Antoine Pitrou and Gregory P. Smith.)
30223022

Doc/whatsnew/2.7.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ Changes to Python's build process and to the C API include:
21512151

21522152
* New function: stemming from the rewrite of string-to-float conversion,
21532153
a new :c:func:`PyOS_string_to_double` function was added. The old
2154-
:c:func:`PyOS_ascii_strtod` and :c:func:`PyOS_ascii_atof` functions
2154+
:c:func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof` functions
21552155
are now deprecated.
21562156

21572157
* New function: :c:func:`PySys_SetArgvEx` sets the value of
@@ -2194,13 +2194,13 @@ Changes to Python's build process and to the C API include:
21942194

21952195
.. XXX these macros don't seem to be described in the c-api docs.
21962196
2197-
* Removed function: :c:macro:`PyEval_CallObject` is now only available
2197+
* Removed function: :c:func:`!PyEval_CallObject` is now only available
21982198
as a macro. A function version was being kept around to preserve
21992199
ABI linking compatibility, but that was in 1997; it can certainly be
22002200
deleted by now. (Removed by Antoine Pitrou; :issue:`8276`.)
22012201

2202-
* New format codes: the :c:func:`PyFormat_FromString`,
2203-
:c:func:`PyFormat_FromStringV`, and :c:func:`PyErr_Format` functions now
2202+
* New format codes: the :c:func:`!PyString_FromFormat`,
2203+
:c:func:`!PyString_FromFormatV`, and :c:func:`PyErr_Format` functions now
22042204
accept ``%lld`` and ``%llu`` format codes for displaying
22052205
C's :c:expr:`long long` types.
22062206
(Contributed by Mark Dickinson; :issue:`7228`.)
@@ -2539,7 +2539,7 @@ For C extensions:
25392539
instead of triggering a :exc:`DeprecationWarning` (:issue:`5080`).
25402540

25412541
* Use the new :c:func:`PyOS_string_to_double` function instead of the old
2542-
:c:func:`PyOS_ascii_strtod` and :c:func:`PyOS_ascii_atof` functions,
2542+
:c:func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof` functions,
25432543
which are now deprecated.
25442544

25452545
For applications that embed Python:

Doc/whatsnew/3.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,8 @@ to the C API.
865865

866866
* No more C API support for restricted execution.
867867

868-
* :c:func:`PyNumber_Coerce`, :c:func:`PyNumber_CoerceEx`,
869-
:c:func:`PyMember_Get`, and :c:func:`PyMember_Set` C APIs are removed.
868+
* :c:func:`!PyNumber_Coerce`, :c:func:`!PyNumber_CoerceEx`,
869+
:c:func:`!PyMember_Get`, and :c:func:`!PyMember_Set` C APIs are removed.
870870

871871
* New C API :c:func:`PyImport_ImportModuleNoBlock`, works like
872872
:c:func:`PyImport_ImportModule` but won't block on the import lock

Doc/whatsnew/3.1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,12 +501,12 @@ Changes to Python's build process and to the C API include:
501501

502502
(Contributed by Mark Dickinson and Lisandro Dalcrin; :issue:`5175`.)
503503

504-
* Deprecated :c:func:`PyNumber_Int`. Use :c:func:`PyNumber_Long` instead.
504+
* Deprecated :c:func:`!PyNumber_Int`. Use :c:func:`PyNumber_Long` instead.
505505

506506
(Contributed by Mark Dickinson; :issue:`4910`.)
507507

508508
* Added a new :c:func:`PyOS_string_to_double` function to replace the
509-
deprecated functions :c:func:`PyOS_ascii_strtod` and :c:func:`PyOS_ascii_atof`.
509+
deprecated functions :c:func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof`.
510510

511511
(Contributed by Mark Dickinson; :issue:`5914`.)
512512

Doc/whatsnew/3.10.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1818,8 +1818,8 @@ Removed
18181818
into their code.
18191819
(Contributed by Dong-hee Na and Terry J. Reedy in :issue:`42299`.)
18201820
1821-
* Removed the :c:func:`PyModule_GetWarningsModule` function that was useless
1822-
now due to the _warnings module was converted to a builtin module in 2.6.
1821+
* Removed the :c:func:`!PyModule_GetWarningsModule` function that was useless
1822+
now due to the :mod:`!_warnings` module was converted to a builtin module in 2.6.
18231823
(Contributed by Hai Shi in :issue:`42599`.)
18241824
18251825
* Remove deprecated aliases to :ref:`collections-abstract-base-classes` from

Doc/whatsnew/3.11.rst

+13-13
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,7 @@ New Features
22162216
* :c:func:`PyBuffer_SizeFromFormat`
22172217
* :c:func:`PyBuffer_ToContiguous`
22182218
* :c:func:`PyBuffer_FromContiguous`
2219-
* :c:func:`PyBuffer_CopyData`
2219+
* :c:func:`PyObject_CopyData`
22202220
* :c:func:`PyBuffer_IsContiguous`
22212221
* :c:func:`PyBuffer_FillContiguousStrides`
22222222
* :c:func:`PyBuffer_FillInfo`
@@ -2562,18 +2562,18 @@ Deprecated
25622562

25632563
* Deprecate the following functions to configure the Python initialization:
25642564

2565-
* :c:func:`PySys_AddWarnOptionUnicode`
2566-
* :c:func:`PySys_AddWarnOption`
2567-
* :c:func:`PySys_AddXOption`
2568-
* :c:func:`PySys_HasWarnOptions`
2569-
* :c:func:`PySys_SetArgvEx`
2570-
* :c:func:`PySys_SetArgv`
2571-
* :c:func:`PySys_SetPath`
2572-
* :c:func:`Py_SetPath`
2573-
* :c:func:`Py_SetProgramName`
2574-
* :c:func:`Py_SetPythonHome`
2575-
* :c:func:`Py_SetStandardStreamEncoding`
2576-
* :c:func:`_Py_SetProgramFullPath`
2565+
* :c:func:`!PySys_AddWarnOptionUnicode`
2566+
* :c:func:`!PySys_AddWarnOption`
2567+
* :c:func:`!PySys_AddXOption`
2568+
* :c:func:`!PySys_HasWarnOptions`
2569+
* :c:func:`!PySys_SetArgvEx`
2570+
* :c:func:`!PySys_SetArgv`
2571+
* :c:func:`!PySys_SetPath`
2572+
* :c:func:`!Py_SetPath`
2573+
* :c:func:`!Py_SetProgramName`
2574+
* :c:func:`!Py_SetPythonHome`
2575+
* :c:func:`!Py_SetStandardStreamEncoding`
2576+
* :c:func:`!_Py_SetProgramFullPath`
25772577

25782578
Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization Configuration
25792579
<init-config>` instead (:pep:`587`).

Doc/whatsnew/3.2.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -2567,7 +2567,7 @@ Changes to Python's build process and to the C API include:
25672567
to set :data:`sys.argv` without also modifying :data:`sys.path`
25682568
(:issue:`5753`).
25692569

2570-
* :c:macro:`PyEval_CallObject` is now only available in macro form. The
2570+
* :c:func:`!PyEval_CallObject` is now only available in macro form. The
25712571
function declaration, which was kept for backwards compatibility reasons, is
25722572
now removed -- the macro was introduced in 1997 (:issue:`8276`).
25732573

@@ -2729,15 +2729,15 @@ require changes to your code:
27292729

27302730
(Contributed by Antoine Pitrou, :issue:`10272`.)
27312731

2732-
* The misleading functions :c:func:`PyEval_AcquireLock()` and
2733-
:c:func:`PyEval_ReleaseLock()` have been officially deprecated. The
2734-
thread-state aware APIs (such as :c:func:`PyEval_SaveThread()`
2735-
and :c:func:`PyEval_RestoreThread()`) should be used instead.
2732+
* The misleading functions :c:func:`!PyEval_AcquireLock` and
2733+
:c:func:`!PyEval_ReleaseLock` have been officially deprecated. The
2734+
thread-state aware APIs (such as :c:func:`PyEval_SaveThread`
2735+
and :c:func:`PyEval_RestoreThread`) should be used instead.
27362736

27372737
* Due to security risks, :func:`asyncore.handle_accept` has been deprecated, and
27382738
a new function, :func:`asyncore.handle_accepted`, was added to replace it.
27392739

27402740
(Contributed by Giampaolo Rodola in :issue:`6706`.)
27412741

2742-
* Due to the new :term:`GIL` implementation, :c:func:`PyEval_InitThreads()`
2743-
cannot be called before :c:func:`Py_Initialize()` anymore.
2742+
* Due to the new :term:`GIL` implementation, :c:func:`!PyEval_InitThreads`
2743+
cannot be called before :c:func:`Py_Initialize` anymore.

Doc/whatsnew/3.3.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,7 @@ Functions and macros manipulating Py_UNICODE* strings:
23032303

23042304
Encoders:
23052305

2306-
* :c:func:`!PyUnicode_Encode`: use :c:func:`PyUnicode_AsEncodedObject`
2306+
* :c:func:`!PyUnicode_Encode`: use :c:func:`!PyUnicode_AsEncodedObject`
23072307
* :c:func:`!PyUnicode_EncodeUTF7`
23082308
* :c:func:`!PyUnicode_EncodeUTF8`: use :c:func:`PyUnicode_AsUTF8` or
23092309
:c:func:`PyUnicode_AsUTF8String`
@@ -2461,7 +2461,7 @@ Porting C code
24612461
--------------
24622462

24632463
* In the course of changes to the buffer API the undocumented
2464-
:c:member:`~Py_buffer.smalltable` member of the
2464+
:c:member:`!smalltable` member of the
24652465
:c:type:`Py_buffer` structure has been removed and the
24662466
layout of the :c:type:`PyMemoryViewObject` has changed.
24672467

Doc/whatsnew/3.5.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2512,15 +2512,15 @@ Changes in the Python API
25122512
Changes in the C API
25132513
--------------------
25142514

2515-
* The undocumented :c:member:`~PyMemoryViewObject.format` member of the
2515+
* The undocumented :c:member:`!format` member of the
25162516
(non-public) :c:type:`PyMemoryViewObject` structure has been removed.
25172517
All extensions relying on the relevant parts in ``memoryobject.h``
25182518
must be rebuilt.
25192519

25202520
* The :c:type:`PyMemAllocator` structure was renamed to
25212521
:c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added.
25222522

2523-
* Removed non-documented macro :c:macro:`PyObject_REPR` which leaked references.
2523+
* Removed non-documented macro :c:macro:`!PyObject_REPR()` which leaked references.
25242524
Use format character ``%R`` in :c:func:`PyUnicode_FromFormat`-like functions
25252525
to format the :func:`repr` of the object.
25262526
(Contributed by Serhiy Storchaka in :issue:`22453`.)

0 commit comments

Comments
 (0)