@@ -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
0 commit comments