This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author danilo.bellini
Recipients danilo.bellini, fdrake, rhettinger, serhiy.storchaka
Date 2016-07-13.17:34:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468431276.27.0.981383514537.issue27495@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-07-13 17:34:36danilo.bellinisetrecipients: + danilo.bellini, fdrake, rhettinger, serhiy.storchaka
2016-07-13 17:34:36danilo.bellinisetmessageid: <1468431276.27.0.981383514537.issue27495@psf.upfronthosting.co.za>
2016-07-13 17:34:36danilo.bellinilinkissue27495 messages
2016-07-13 17:34:36danilo.bellinicreate