diff Doc/lib/libpprint.tex @ 31085:a2f6c6a67f24 legacy-trunk

Add parameters indent, width and depth to pprint.pprint() and pprint.pformat() and pass them along to the PrettyPrinter constructor.
author Walter Dörwald <walter@livinglogic.de>
date Wed, 03 Dec 2003 20:26:05 +0000
parents ce07118ee5d2
children 67f2190e1f6d
line wrap: on
line diff
--- a/Doc/lib/libpprint.tex	Wed Dec 03 20:15:28 2003 +0000
+++ b/Doc/lib/libpprint.tex	Wed Dec 03 20:26:05 2003 +0000
@@ -77,17 +77,23 @@
 
 The \class{PrettyPrinter} class supports several derivative functions:
 
-\begin{funcdesc}{pformat}{object}
-Return the formatted representation of \var{object} as a string.  The
-default parameters for formatting are used.
+\begin{funcdesc}{pformat}{object\optional{, indent\optional{,
+width\optional{, depth}}}}
+Return the formatted representation of \var{object} as a string.  \var{indent},
+\var{width} and \var{depth} will be passed to the \class{PrettyPrinter}
+constructor as formatting parameters.
+\versionchanged[The parameters \var{indent}, \var{width} and \var{depth}
+were added]{2.4}
 \end{funcdesc}
 
-\begin{funcdesc}{pprint}{object\optional{, stream}}
+\begin{funcdesc}{pprint}{object\optional{, stream\optional{,
+indent\optional{, width\optional{, depth}}}}}
 Prints the formatted representation of \var{object} on \var{stream},
 followed by a newline.  If \var{stream} is omitted, \code{sys.stdout}
 is used.  This may be used in the interactive interpreter instead of a
-\keyword{print} statement for inspecting values.  The default
-parameters for formatting are used.
+\keyword{print} statement for inspecting values.    \var{indent},
+\var{width} and \var{depth} will be passed to the \class{PrettyPrinter}
+constructor as formatting parameters.
 
 \begin{verbatim}
 >>> stuff = sys.path[:]
@@ -101,6 +107,8 @@
  '/usr/local/lib/python1.5/sharedmodules',
  '/usr/local/lib/python1.5/tkinter']
 \end{verbatim}
+\versionchanged[The parameters \var{indent}, \var{width} and \var{depth}
+were added]{2.4}
 \end{funcdesc}
 
 \begin{funcdesc}{isreadable}{object}