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

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.python.org — 3.20.1 PrettyPrinter Objects

Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 3.20 pprint Up: 3.20 pprint Next: 3.21 repr


3.20.1 PrettyPrinter Objects

PrettyPrinter instances have the following methods:

pformat (object)
Return the formatted representation of object. This takes into Account the options passed to the PrettyPrinter constructor.

pprint (object)
Print the formatted representation of object on the configured stream, followed by a newline.

The following methods provide the implementations for the corresponding functions of the same names. Using these methods on an instance is slightly more efficient since new PrettyPrinter objects don't need to be created.

isreadable (object)
Determine if the formatted representation of the object is ``readable,'' or can be used to reconstruct the value using eval(). Note that this returns false for recursive objects. If the depth parameter of the PrettyPrinter is set and the object is deeper than allowed, this returns false.

isrecursive (object)
Determine if the object requires a recursive representation.


Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 3.20 pprint Up: 3.20 pprint Next: 3.21 repr

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.