◐ Shell
clean mode source ↗

[3.13] gh-146056: Fix repr() for lists containing NULLs (GH-146129) (GH-146155) by serhiy-storchaka · Pull Request #146271 · python/cpython

Expand Up @@ -319,6 +319,8 @@ Object Protocol representation on success, ``NULL`` on failure. This is the equivalent of the Python expression ``repr(o)``. Called by the :func:`repr` built-in function.
If argument is ``NULL``, return the string ``'<NULL>'``.
.. versionchanged:: 3.4 This function now includes a debug assertion to help ensure that it does not silently discard an active exception. Expand All @@ -333,6 +335,8 @@ Object Protocol a string similar to that returned by :c:func:`PyObject_Repr` in Python 2. Called by the :func:`ascii` built-in function.
If argument is ``NULL``, return the string ``'<NULL>'``.
.. index:: string; PyObject_Str (C function)

Expand All @@ -343,6 +347,8 @@ Object Protocol Python expression ``str(o)``. Called by the :func:`str` built-in function and, therefore, by the :func:`print` function.
If argument is ``NULL``, return the string ``'<NULL>'``.
.. versionchanged:: 3.4 This function now includes a debug assertion to help ensure that it does not silently discard an active exception. Expand All @@ -358,6 +364,8 @@ Object Protocol a TypeError is raised when *o* is an integer instead of a zero-initialized bytes object.
If argument is ``NULL``, return the :class:`bytes` object ``b'<NULL>'``.

.. c:function:: int PyObject_IsSubclass(PyObject *derived, PyObject *cls)
Expand Down