Message270332
Wouldn't a fix for all standard collections be a fix for Python 3.5+, therefore another issue? http://bugs.python.org/issue23870
This issue is about sets/frozensets Python 3.2+, and I'm pretty sure it's backwards compatible, as I don't think any code running on Python 3.2.6 would depend on pprint randomness (how could?). Also, a multiline pprint would sort (tested with Python 3.2.6):
>>> pprint.pprint(set(string.digits), width=7)
{'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9'}
I see no reason to see a fix to this inconsistent behavior (sorting on multiline, not sorting on single line) as an enhancement just for a new Python 3.6 version. Besides being backwards compatible, the test_pprint was really verifying the order on set(range(n)) for small n, something that is already sorted by set.__repr__ but appears in test_pprint, which make me think it was intended as a pretty printer test, not as a set.__repr__ test. |
|
Date |
User |
Action |
Args |
2016-07-13 17:34:36 | danilo.bellini | set | recipients:
+ danilo.bellini, fdrake, rhettinger, serhiy.storchaka |
2016-07-13 17:34:36 | danilo.bellini | set | messageid: <1468431276.27.0.981383514537.issue27495@psf.upfronthosting.co.za> |
2016-07-13 17:34:36 | danilo.bellini | link | issue27495 messages |
2016-07-13 17:34:36 | danilo.bellini | create | |
|