Message198475
pprint not only adds indentation, but also increases right margin for nested items.
>>> pprint.pprint([' '.join(str(i) for i in range(30))]*2)
['0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 '
'28 29',
'0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 '
'28 29']
>>> pprint.pprint([[[[[[[[[[[[' '.join(str(i) for i in range(30))]]]]]]]]]]]]*2)
[[[[[[[[[[[['0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 '
'21 22 23 24 25 26 27 28 29']]]]]]]]]]],
[[[[[[[[[[['0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 '
'21 22 23 24 25 26 27 28 29']]]]]]]]]]]]
As you can see in second example there is a place for at least '21 22 23 ' at the right. In case of multiline representation of nested items pprint can reserve space only at the end of last line and continue inner lines to full width. |
|
Date |
User |
Action |
Args |
2013-09-27 13:50:34 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, fdrake, pitrou |
2013-09-27 13:50:34 | serhiy.storchaka | set | messageid: <1380289834.62.0.88627838079.issue19105@psf.upfronthosting.co.za> |
2013-09-27 13:50:34 | serhiy.storchaka | link | issue19105 messages |
2013-09-27 13:50:34 | serhiy.storchaka | create | |
|