summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-03-25 07:20:15 (GMT)
committerGeorg Brandl <georg@python.org>2008-03-25 07:20:15 (GMT)
commit18f1914a02daec18657d0eeb1d5060fc05638a3c (patch)
tree9e8110d66533136c70c7de5fc6756ab947f0d1f6 /Doc/library
parentbb89e686e3217b43611854755359cb149c5e2cf6 (diff)
downloadcpython-18f1914a02daec18657d0eeb1d5060fc05638a3c.zip
cpython-18f1914a02daec18657d0eeb1d5060fc05638a3c.tar.gz
cpython-18f1914a02daec18657d0eeb1d5060fc05638a3c.tar.bz2
#868845: document <...> reprs.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/functions.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index e54c6e2..e966495 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1004,11 +1004,15 @@ available. They are listed here in alphabetical order.
.. function:: repr(object)
- Return a string containing a printable representation of an object. This is the
- same value yielded by conversions (reverse quotes). It is sometimes useful to be
- able to access this operation as an ordinary function. For many types, this
- function makes an attempt to return a string that would yield an object with the
- same value when passed to :func:`eval`.
+ Return a string containing a printable representation of an object. This is
+ the same value yielded by conversions (reverse quotes). It is sometimes
+ useful to be able to access this operation as an ordinary function. For many
+ types, this function makes an attempt to return a string that would yield an
+ object with the same value when passed to :func:`eval`, otherwise the
+ representation is a string enclosed in angle brackets that contains the name
+ 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.
.. function:: reversed(seq)