Skip to content

Commit 9eb4c44

Browse files
committed
pythongh-96197: Define the behavior of repr if sys.displayhook is lost
1 parent bcc4cb0 commit 9eb4c44

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
@@ -1513,6 +1513,8 @@ are always available. They are listed here in alphabetical order.
15131513
of the type of the object together with additional information often
15141514
including the name and address of the object. A class can control what this
15151515
function returns for its instances by defining a :meth:`__repr__` method.
1516+
If :func:`sys.displayhook` is not available to be called, this function will
1517+
raise :exc:`RuntimeError`.
15161518

15171519

15181520
.. function:: reversed(seq)

0 commit comments

Comments
 (0)