Skip to content

Commit b69ba3d

Browse files
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)
(cherry picked from commit 0319cd6) Co-authored-by: Dong-hee Na <[email protected]>
1 parent 5f4588f commit b69ba3d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/library/functions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,8 @@ are always available. They are listed here in alphabetical order.
15091509
of the type of the object together with additional information often
15101510
including the name and address of the object. A class can control what this
15111511
function returns for its instances by defining a :meth:`__repr__` method.
1512+
If :func:`sys.displayhook` is not accessible, this function will raise
1513+
:exc:`RuntimeError`.
15121514

15131515

15141516
.. function:: reversed(seq)

0 commit comments

Comments
 (0)