summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/functions.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 27fce5a..a4852b9 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1569,6 +1569,16 @@ are always available. They are listed here in alphabetical order.
If :func:`sys.displayhook` is not accessible, this function will raise
:exc:`RuntimeError`.
+ This class has a custom representation that can be evaluated::
+
+ class Person:
+ def __init__(self, name, age):
+ self.name = name
+ self.age = age
+
+ def __repr__(self):
+ return f"Person('{self.name}', {self.age})"
+
.. function:: reversed(seq)