summaryrefslogtreecommitdiffstats
path: root/Doc/reference/datamodel.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-10-12 12:51:12 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-10-12 12:51:12 (GMT)
commit1c9313f7db801eea125ccf1c592947f347b1aa42 (patch)
treed0a684b756dddb207ad25d4033aba3aca17ba19a /Doc/reference/datamodel.rst
parent1bc15c21d6f0d233983c79d852a5d6ee10c2781e (diff)
downloadcpython-1c9313f7db801eea125ccf1c592947f347b1aa42.zip
cpython-1c9313f7db801eea125ccf1c592947f347b1aa42.tar.gz
cpython-1c9313f7db801eea125ccf1c592947f347b1aa42.tar.bz2
remove a mention of backtick repr
Diffstat (limited to 'Doc/reference/datamodel.rst')
-rw-r--r--Doc/reference/datamodel.rst17
1 files changed, 8 insertions, 9 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index b154663..3c7fcfc 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1108,15 +1108,14 @@ Basic customization
.. index:: builtin: repr
- Called by the :func:`repr` built-in function and by string conversions (reverse
- quotes) to compute the "official" string representation of an object. If at all
- possible, this should look like a valid Python expression that could be used to
- recreate an object with the same value (given an appropriate environment). If
- this is not possible, a string of the form ``<...some useful description...>``
- should be returned. The return value must be a string object. If a class
- defines :meth:`__repr__` but not :meth:`__str__`, then :meth:`__repr__` is also
- used when an "informal" string representation of instances of that class is
- required.
+ Called by the :func:`repr` built-in function to compute the "official" string
+ representation of an object. If at all possible, this should look like a
+ valid Python expression that could be used to recreate an object with the
+ same value (given an appropriate environment). If this is not possible, a
+ string of the form ``<...some useful description...>`` should be returned.
+ The return value must be a string object. If a class defines :meth:`__repr__`
+ but not :meth:`__str__`, then :meth:`__repr__` is also used when an
+ "informal" string representation of instances of that class is required.
This is typically used for debugging, so it is important that the representation
is information-rich and unambiguous.