Danilo J. S. Bellini added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27495>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to