diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 1db28060795442..086b3a3bee579c 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1568,6 +1568,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)