Re:Comprehensive Python Cheatsheet (2018)
by snicker7 on Monday February 04, 2019 @09:08AM
(#19076440)
As of 3.7 (3.6 for cpython), dictionaries have a deterministic order.
[ Parent
| on HN ]
Re:Comprehensive Python Cheatsheet (2018)
by thro_away_n on Monday February 04, 2019 @10:55AM
(#19077294)
What's the best way to write code that relies on this deterministic order and prevent it from running incorrectly with older python versions?
Re:Comprehensive Python Cheatsheet (2018)
by b_tterc_p on Monday February 04, 2019 @11:09AM
(#19077443)
Import collections.OrderedDict as you would have done beforehand. There are still some differences between them.
(Dicts in 3.7 and ordered dicts)
https://stackoverflow.com/questions/50872498/will-ordereddic...