[issue1713041] fix for 1712742: corrects pprint's handling of 'depth'

Rodrigo Bernardo Pimentel report at bugs.python.org
Mon May 12 06:09:28 CEST 2008


Rodrigo Bernardo Pimentel <rbp at isnomore.net> added the comment:

It seems that somewhere along the road between revision 55144 (where the
first patch was generated) and current trunk (revision 63129),
PrettyPrinter._format has stopped handling depth!

I've attached a patch that fixes this, along with the fixes this issue
originally proposed (including the tests and documentation updates).
With this patch, unit tests and the documentation's doctests all pass.

BTW, doctesting Doc/library/pprint.rst with optionflags=doctest.ELLIPSIS
erroneously interprets pprint's '...' (indicating depth exceeded) as
doctest ellipses! Testing without ELLIPSIS gives an error on output with
something like "[<Recursion on list with id=...>]", testing with it
hides errors. Ugh!

----------
nosy: +rbp -errebepe
Added file: http://bugs.python.org/file10302/pprint-r63129.patch

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1713041>
_____________________________________


More information about the Python-bugs-list mailing list