This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author draghuram
Recipients
Date 2007-05-09.14:44:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content

Hi Neal,

I assume you are referring to the example 

>>> import parser
>>> tup = parser.ast2tuple(
...     parser.suite(open('pprint.py').read()))[1][1][1]
>>> pp = pprint.PrettyPrinter(depth=6)
>>> pp.pprint(tup)

in the document. Is that correct? I ran this example with and without my patch. Without the update, the example printed 7 levels which is one level too deep. With the patch, it printed 6 levels, which seems correct to me.

# without patch. prints 7 levels.
$ ../python/python testdoc.py 
(268, (269, (326, (303, (304, (305, (306, (...))))))))

# with patch. prints 6 levels.
$ ../python/python testdoc.py 
(268, (269, (326, (303, (304, (305, (...)))))))

I am attaching the file testdoc.py which contains the doc example. I just wanted to confirm that this is what you are referring to.




File Added: testdoc.py
History
Date User Action Args
2007-08-23 15:58:21adminlinkissue1713041 messages
2007-08-23 15:58:21admincreate