Why does not pprint work?

Chris Kaynor ckaynor at zindagigames.com
Tue Jul 22 18:22:41 EDT 2014


On Tue, Jul 22, 2014 at 3:17 PM, emile <emile at fenx.com> wrote:

> Then, how can I list all the function of pprint?
>>
>
> use the dir builtin:
>
> >>> dir (pprint)
> ['PrettyPrinter', '_StringIO', '__all__', '__builtins__', '__doc__',
> '__file__', '__name__', '_commajoin', '_id', '_len', '_perfcheck',
> '_recursion', '_safe_repr', '_sys', '_type', 'isreadable', 'isrecursive',
> 'pformat', 'pprint', 'saferepr']


Another useful feature is the "help" function (can be used like
"help(pprint)" or just "help()" for interactive usage), which will also
provide the documentation for each item in addition to just the names.

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140722/02d08379/attachment.html>


More information about the Python-list mailing list