summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-08-25 19:13:04 -0700
committerGitHub <noreply@github.com>2022-08-25 19:13:04 -0700
commitb69ba3d7233013ea8cb95a3e30e2338f7f76b359 (patch)
treec25b05b0e40a77920012bd259eedcc8caefc40ed
parent5f4588feec1de272c79b29eff8ee960b12c0a115 (diff)
downloadcpython-git-b69ba3d7233013ea8cb95a3e30e2338f7f76b359.tar.gz
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)
(cherry picked from commit 0319cd6825f3c247a875c91493a38992fb33a5b3) Co-authored-by: Dong-hee Na <donghee.na@python.org>
-rw-r--r--Doc/library/functions.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 95f11e2398..86c6b3b4c2 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -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)