Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c9313f

Browse files
committed
remove a mention of backtick repr
1 parent 1bc15c2 commit 1c9313f

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

Doc/reference/datamodel.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,15 +1108,14 @@ Basic customization
11081108

11091109
.. index:: builtin: repr
11101110

1111-
Called by the :func:`repr` built-in function and by string conversions (reverse
1112-
quotes) to compute the "official" string representation of an object. If at all
1113-
possible, this should look like a valid Python expression that could be used to
1114-
recreate an object with the same value (given an appropriate environment). If
1115-
this is not possible, a string of the form ``<...some useful description...>``
1116-
should be returned. The return value must be a string object. If a class
1117-
defines :meth:`__repr__` but not :meth:`__str__`, then :meth:`__repr__` is also
1118-
used when an "informal" string representation of instances of that class is
1119-
required.
1111+
Called by the :func:`repr` built-in function to compute the "official" string
1112+
representation of an object. If at all possible, this should look like a
1113+
valid Python expression that could be used to recreate an object with the
1114+
same value (given an appropriate environment). If this is not possible, a
1115+
string of the form ``<...some useful description...>`` should be returned.
1116+
The return value must be a string object. If a class defines :meth:`__repr__`
1117+
but not :meth:`__str__`, then :meth:`__repr__` is also used when an
1118+
"informal" string representation of instances of that class is required.
11201119

11211120
This is typically used for debugging, so it is important that the representation
11221121
is information-rich and unambiguous.

0 commit comments

Comments
 (0)