Skip to content

Commit a64f2f3

Browse files
Deploy preview for PR 1214 🛫
1 parent 82e0b26 commit a64f2f3

File tree

584 files changed

+620
-590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

584 files changed

+620
-590
lines changed

pr-preview/pr-1214/_sources/c-api/file.rst.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,12 @@ the :mod:`io` APIs instead.
123123
124124
Write object *obj* to file object *p*. The only supported flag for *flags* is
125125
:c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written
126-
instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; the
127-
appropriate exception will be set.
126+
instead of the :func:`repr`.
127+
128+
If *obj* is ``NULL``, write the string ``"<NULL>"``.
128129
130+
Return ``0`` on success or ``-1`` on failure; the
131+
appropriate exception will be set.
129132
130133
.. c:function:: int PyFile_WriteString(const char *s, PyObject *p)
131134

pr-preview/pr-1214/_sources/c-api/object.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ Object Protocol
319319
representation on success, ``NULL`` on failure. This is the equivalent of the
320320
Python expression ``repr(o)``. Called by the :func:`repr` built-in function.
321321
322+
If argument is ``NULL``, return the string ``'<NULL>'``.
323+
322324
.. versionchanged:: 3.4
323325
This function now includes a debug assertion to help ensure that it
324326
does not silently discard an active exception.
@@ -333,6 +335,8 @@ Object Protocol
333335
a string similar to that returned by :c:func:`PyObject_Repr` in Python 2.
334336
Called by the :func:`ascii` built-in function.
335337
338+
If argument is ``NULL``, return the string ``'<NULL>'``.
339+
336340
.. index:: string; PyObject_Str (C function)
337341
338342
@@ -343,6 +347,8 @@ Object Protocol
343347
Python expression ``str(o)``. Called by the :func:`str` built-in function
344348
and, therefore, by the :func:`print` function.
345349
350+
If argument is ``NULL``, return the string ``'<NULL>'``.
351+
346352
.. versionchanged:: 3.4
347353
This function now includes a debug assertion to help ensure that it
348354
does not silently discard an active exception.
@@ -358,6 +364,8 @@ Object Protocol
358364
a TypeError is raised when *o* is an integer instead of a zero-initialized
359365
bytes object.
360366
367+
If argument is ``NULL``, return the :class:`bytes` object ``b'<NULL>'``.
368+
361369
362370
.. c:function:: int PyObject_IsSubclass(PyObject *derived, PyObject *cls)
363371

pr-preview/pr-1214/_sources/c-api/unicode.rst.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,8 +1842,6 @@ object.
18421842
On success, return ``0``.
18431843
On error, set an exception, leave the writer unchanged, and return ``-1``.
18441844
1845-
.. versionadded:: 3.14
1846-
18471845
.. c:function:: int PyUnicodeWriter_WriteWideChar(PyUnicodeWriter *writer, const wchar_t *str, Py_ssize_t size)
18481846
18491847
Write the wide string *str* into *writer*.
@@ -1874,9 +1872,15 @@ object.
18741872
18751873
Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*.
18761874
1875+
If *obj* is ``NULL``, write the string ``"<NULL>"`` into *writer*.
1876+
18771877
On success, return ``0``.
18781878
On error, set an exception, leave the writer unchanged, and return ``-1``.
18791879
1880+
.. versionchanged:: 3.14.4
1881+
1882+
Added support for ``NULL``.
1883+
18801884
.. c:function:: int PyUnicodeWriter_WriteSubstring(PyUnicodeWriter *writer, PyObject *str, Py_ssize_t start, Py_ssize_t end)
18811885
18821886
Write the substring ``str[start:end]`` into *writer*.

pr-preview/pr-1214/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 3月 22, 2026 (00:26 UTC)。
359+
最後更新於 3月 23, 2026 (00:28 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1214/bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 3月 22, 2026 (00:26 UTC)。
396+
最後更新於 3月 23, 2026 (00:28 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>
399399

pr-preview/pr-1214/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ <h3>導航</h3>
365365
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
366366
<br>
367367
<br>
368-
最後更新於 3月 22, 2026 (00:26 UTC)。
368+
最後更新於 3月 23, 2026 (00:28 UTC)。
369369

370370
<a href="/bugs.html">發現 bug</a>
371371

pr-preview/pr-1214/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ <h3>導航</h3>
574574
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
575575
<br>
576576
<br>
577-
最後更新於 3月 22, 2026 (00:26 UTC)。
577+
最後更新於 3月 23, 2026 (00:28 UTC)。
578578

579579
<a href="/bugs.html">發現 bug</a>
580580

pr-preview/pr-1214/c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ <h3>導航</h3>
514514
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
515515
<br>
516516
<br>
517-
最後更新於 3月 22, 2026 (00:26 UTC)。
517+
最後更新於 3月 23, 2026 (00:28 UTC)。
518518

519519
<a href="/bugs.html">發現 bug</a>
520520

pr-preview/pr-1214/c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ <h3>導航</h3>
996996
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
997997
<br>
998998
<br>
999-
最後更新於 3月 22, 2026 (00:26 UTC)。
999+
最後更新於 3月 23, 2026 (00:28 UTC)。
10001000

10011001
<a href="/bugs.html">發現 bug</a>
10021002

pr-preview/pr-1214/c-api/bool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h3>導航</h3>
376376
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
377377
<br>
378378
<br>
379-
最後更新於 3月 22, 2026 (00:26 UTC)。
379+
最後更新於 3月 23, 2026 (00:28 UTC)。
380380

381381
<a href="/bugs.html">發現 bug</a>
382382

0 commit comments

Comments
 (0)