]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 26 Aug 2022 02:13:04 +0000 (19:13 -0700)
committerGitHub <noreply@github.com>
Fri, 26 Aug 2022 02:13:04 +0000 (19:13 -0700)
(cherry picked from commit 0319cd6825f3c247a875c91493a38992fb33a5b3)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
Doc/library/functions.rst

index 95f11e2398832ca68fe5a32d18cd1febd532a7ac..86c6b3b4c26e4ba12687ed900577b84ce4cf7b1b 100644 (file)
@@ -1509,6 +1509,8 @@ are always available.  They are listed here in alphabetical order.
    of the type of the object together with additional information often
    including the name and address of the object.  A class can control what this
    function returns for its instances by defining a :meth:`__repr__` method.
+   If :func:`sys.displayhook` is not accessible, this function will raise
+   :exc:`RuntimeError`.
 
 
 .. function:: reversed(seq)