Python Dicts are now insertion-ordered (Python 3.7)
ฝัง
- เผยแพร่เมื่อ 18 ม.ค. 2021
- Second episode of the 'What's new in Python 3.7+ series' explores how Python dictionaries are different from earlier versions in that their order of insertion is now preserved, and see code examples of why that matters.
docs.python.org/3/library/std...
- Version 3.7: Dictionary order is guaranteed to be insertion order. This behavior was an implementation detail of CPython from 3.6.
- Version 3.8: Dictionaries are now reversible