From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 26 Aug 2022 02:12:43 +0000 (-0700) Subject: gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242) X-Git-Tag: v3.11.0rc2~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=315807dac99d52b817f5370975335dea911ba673;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index fbde9129274e..068113b3eb56 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -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)