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

SourceForge.net noreply at sourceforge.net
Fri May 4 21:17:28 CEST 2007


Bugs item #1712742, was opened at 2007-05-04 09:47
Message generated for change (Comment added) made by draghuram
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.


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

Comment By: Raghuram Devarakonda (draghuram)
Date: 2007-05-04 15:17

Message:
Logged In: YES 
user_id=984087
Originator: NO


I created patch 1712742 to fix this. BTW, I think that a depth of 1 should
mean the top level object. 

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

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