Serhiy Storchaka added the comment:
Thank you Antoine for your review.
But first variant of the patch doesn't affect an example at the top of this
issue, it doesn't change string formatting. The second variant makes string
formatting use all free space at the right. With the patch:
>>> import pprint
>>> print('='*80) # a rule
================================================================================
>>> 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']]]]]]]]]]]]
Could you please make a review of new patch?
----------
Added file: http://bugs.python.org/file37308/pprint_all_width_2.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19105>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com