GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • 3.21.1 Repr Objects
  • 3.21.2 Subclassing Repr Objects

This view

  • Original page
  • New address

GeezerVison is showing docs.python.org — 3.21 repr -- Alternate repr() implementation

Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 3.20.1 PrettyPrinter Objects Up: 3. Python Runtime Services Next: 3.21.1 Repr Objects

3.21 repr -- Alternate repr() implementation

The repr module provides a means for producing object representations with limits on the size of the resulting strings. This is used in the Python debugger and may be useful in other contexts as well.

This module provides a class, an instance, and a function:

Repr ()
Class which provides formatting services useful in implementing functions similar to the built-in repr(); size limits for different object types are added to avoid the generation of representations which are excessively long.

aRepr
This is an instance of Repr which is used to provide the repr() function described below. Changing the attributes of this object will affect the size limits used by repr() and the Python debugger.

repr (obj)
This is the repr() method of aRepr. It returns a string similar to that returned by the built-in function of the same name, but with limits on most sizes.


Subsections
  • 3.21.1 Repr Objects
  • 3.21.2 Subclassing Repr Objects


Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 3.20.1 PrettyPrinter Objects Up: 3. Python Runtime Services Next: 3.21.1 Repr Objects

See About this document... for information on suggesting changes.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.