On Mon, Dec 18, 2017 at 07:37:03PM -0800, Nathaniel Smith wrote: > On Mon, Dec 18, 2017 at 7:02 PM, Barry Warsaw <barry at python.org> wrote: > > On Dec 18, 2017, at 21:11, Chris Barker <chris.barker at noaa.gov> wrote: > > > >> Will changing pprint be considered a breaking change? > > > > Yes, definitely. > > Wait, what? Why would changing pprint (so that it accurately reflects > dict's new underlying semantics!) be a breaking change? I have a script which today prints data like so: {'Aaron': 62, 'Anne': 51, 'Bob': 23, 'George': 30, 'Karen': 45, 'Sue': 17, 'Sylvester': 34} Tomorrow, it will suddenly start printing: {'Bob': 23, 'Karen': 45, 'Sue': 17, 'George': 30, 'Aaron': 62, 'Anne': 51, 'Sylvester': 34} and my users will yell at me that my script is broken because the data is now in random order. Now, maybe that's my own damn fault for using pprint instead of writing my own pretty printer... but surely the point of pprint is so I don't have to write my own? Besides, the docs say very prominently: "Dictionaries are sorted by key before the display is computed." https://docs.python.org/3/library/pprint.html so I think I can be excused having relied on that feature. -- Steve
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4