Author serhiy.storchaka
Recipients fdrake, pitrou, serhiy.storchaka
Date 2013-09-27.13:50:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1380289834.62.0.88627838079.issue19105@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-09-27 13:50:34serhiy.storchakasetrecipients: + serhiy.storchaka, fdrake, pitrou
2013-09-27 13:50:34serhiy.storchakasetmessageid: <1380289834.62.0.88627838079.issue19105@psf.upfronthosting.co.za>
2013-09-27 13:50:34serhiy.storchakalinkissue19105 messages
2013-09-27 13:50:34serhiy.storchakacreate