]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)
authorDong-hee Na <donghee.na@python.org>
Fri, 26 Aug 2022 02:02:57 +0000 (11:02 +0900)
committerGitHub <noreply@github.com>
Fri, 26 Aug 2022 02:02:57 +0000 (11:02 +0900)
Doc/library/functions.rst

index 93e2f5b26a74c9409ecb3d75b1291bf3b2bb7299..e86e1857c7a67d43e63c3b654f8da0afa8f4b9af 100644 (file)
@@ -1515,6 +1515,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)