Movatterモバイル変換
[0]ホーム
3.24.1 PrettyPrinter Objects
PrettyPrinter instances have the following methods:
- pformat(object)
- Return the formatted representation ofobject. This takes intoAccount the options passed to thePrettyPrinter constructor.
- pprint(object)
- Print the formatted representation ofobject on the configuredstream, followed by a newline.
The following methods provide the implementations for thecorresponding functions of the same names. Using these methods on aninstance is slightly more efficient since newPrettyPrinterobjects 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 usingeval() . Note that this returns false forrecursive objects. If thedepth parameter of thePrettyPrinter is set and the object is deeper than allowed,this returns false.
- isrecursive(object)
- Determine if the object requires a recursive representation.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭