Message52581
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 |
|
Date |
User |
Action |
Args |
2007-08-23 15:58:21 | admin | link | issue1713041 messages |
2007-08-23 15:58:21 | admin | create | |
|