GNU Info

Info Node: (python2.1-lib.info)PrettyPrinter Objects

(python2.1-lib.info)PrettyPrinter Objects


Prev: pprint Up: pprint
Enter node , (file) or (file)node

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.


automatically generated by info2www version 1.2.2.9