[ python-Bugs-1712742 ] pprint handles depth argument incorrectly

SourceForge.net noreply at sourceforge.net
Fri May 4 15:47:32 CEST 2007


Bugs item #1712742, was opened at 2007-05-04 16:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1712742&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Dmitrii Tisnek (dimaq)
Assigned to: Nobody/Anonymous (nobody)
Summary: pprint handles depth argument incorrectly

Initial Comment:
pprint.pprint( [[[[[ ]]]]], depth=0)
AssertionError: depth must be > 0

pprint.pprint( [[[[[ ]]]]], depth=0.5)
[[...]]

pprint.pprint( [[[[[ ]]]]], depth=1)
[[[...]]]

I would like to see the root (that is [...]) with depth=0 (or depth=1 if you insist), either way, [[[...]]] for depth=1 is incorrect.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1712742&group_id=5470


More information about the Python-bugs-list mailing list