diff options
author | Georg Brandl <georg@python.org> | 2008-03-25 07:21:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-03-25 07:21:32 (GMT) |
commit | 68ee3a59bc08f821e53596c49cb7dea6857443af (patch) | |
tree | 00b2c9706692c1f2631426b860b68a31a9a690e5 /Doc/library | |
parent | 03bd4f04ddec10dc3795209f68b34d5cd04cfe3b (diff) | |
download | cpython-68ee3a59bc08f821e53596c49cb7dea6857443af.zip cpython-68ee3a59bc08f821e53596c49cb7dea6857443af.tar.gz cpython-68ee3a59bc08f821e53596c49cb7dea6857443af.tar.bz2 |
#868845: document <...> reprs.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/functions.rst | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 3c27d82..7c97edb 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1,4 +1,4 @@ - +.. XXX document all delegations to __special__ methods .. _built-in-funcs: Built-in Functions @@ -908,11 +908,13 @@ 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. 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) |