Commit 68ee3a59 authored by Georg Brandl's avatar Georg Brandl

#868845: document <...> reprs.

parent 03bd4f04
.. XXX document all delegations to __special__ methods
.. _built-in-funcs: .. _built-in-funcs:
Built-in Functions Built-in Functions
...@@ -908,11 +908,13 @@ available. They are listed here in alphabetical order. ...@@ -908,11 +908,13 @@ available. They are listed here in alphabetical order.
.. function:: repr(object) .. function:: repr(object)
Return a string containing a printable representation of an object. This is the Return a string containing a printable representation of an object. For many
same value yielded by conversions (reverse quotes). It is sometimes useful to be types, this function makes an attempt to return a string that would yield an
able to access this operation as an ordinary function. For many types, this object with the same value when passed to :func:`eval`, otherwise the
function makes an attempt to return a string that would yield an object with the representation is a string enclosed in angle brackets that contains the name
same value when passed to :func:`eval`. 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) .. function:: reversed(seq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment