Message144247
| Author |
terry.reedy |
| Recipients |
terry.reedy |
| Date |
2011年09月18日.17:41:12 |
| SpamBayes Score |
2.5870833e-07 |
| Marked as misclassified |
No |
| Message-id |
<1316367673.59.0.101028933355.issue13004@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
From python-ideas thread "truncate sequences in pretty-print ?"
On Sat, Sep 17, 2011 at 9:59 PM, Steven Samuel Cole
> i use pprint quite a bit during development to give me quick insight
> into what is going on inside my application.
> however, when there's any sequences involved, the output becomes less
> useful the longer these sequences are - i often find myself scrolling
> around (or even searching) in the terminal window, trying to find the
> bit of output i am interested in.
>
> imo, it would be great if pprint had a parameter 'max_len' or so that
> reduces output of every sequence to a maximum and inserts something
> like '...' to indicate truncation, e.g.
> {'my key': ['my list item 01',
> 'my list item 02',
> 'my list item 03',
> 'my list item 04',
> 'my list item 05',
> 'my list item 06',
> 'my list item 07',
> 'my list item 08',
> '...',
> 'my list item 10',]}
>
> somewhat comparable to the '...' already printed when a structure is
> more deeply nested than you want to know right now.
On 9/18/2011 10:59 AM, Guido van Rossum wrote:
Agreed, this would be a useful feature. I've reimplemented something
like pprint a few times and always had to implement this truncation
feature. If you or someone can contribute a patch that would be much
appreciated! |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年09月18日 17:41:13 | terry.reedy | set | recipients:
+ terry.reedy |
| 2011年09月18日 17:41:13 | terry.reedy | set | messageid: <1316367673.59.0.101028933355.issue13004@psf.upfronthosting.co.za> |
| 2011年09月18日 17:41:12 | terry.reedy | link | issue13004 messages |
| 2011年09月18日 17:41:12 | terry.reedy | create |
|