~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/library/repr.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
.. data:: aRepr
29
29
 
30
 
   This is an instance of :class:`Repr` which is used to provide the :func:`repr`
 
30
   This is an instance of :class:`Repr` which is used to provide the :func:`.repr`
31
31
   function described below.  Changing the attributes of this object will affect
32
 
   the size limits used by :func:`repr` and the Python debugger.
 
32
   the size limits used by :func:`.repr` and the Python debugger.
33
33
 
34
34
 
35
35
.. function:: repr(obj)
36
36
 
37
 
   This is the :meth:`repr` method of ``aRepr``.  It returns a string similar to
38
 
   that returned by the built-in function of the same  name, but with limits on
39
 
   most sizes.
 
37
   This is the :meth:`~Repr.repr` method of ``aRepr``.  It returns a string
 
38
   similar to that returned by the built-in function of the same name, but with
 
39
   limits on most sizes.
40
40
 
41
41
 
42
42
.. _repr-objects:
99
99
 
100
100
.. method:: Repr.repr1(obj, level)
101
101
 
102
 
   Recursive implementation used by :meth:`repr`.  This uses the type of *obj* to
 
102
   Recursive implementation used by :meth:`.repr`.  This uses the type of *obj* to
103
103
   determine which formatting method to call, passing it *obj* and *level*.  The
104
104
   type-specific methods should call :meth:`repr1` to perform recursive formatting,
105
105
   with ``level - 1`` for the value of *level* in the recursive  call.