Python dicts are now ordered
softwaremaniacs.org
Python dicts are now ordered
1–10 of 457 posts
Re: Python dicts are now ordered
#2Re: Python dicts are now ordered
#3Re: Python dicts are now ordered
#4Javascript taught me to never assume any ordering in a dict/map/hashmap (whatever the term)
EDIT: to clarify, I was asking about JavaScript there.
Re: Python dicts are now ordered
#5I really appreciate the people who dive deep into these implementation details, and continue to optimize the languages we all use.
Re: Python dicts are now ordered
#6Javascript taught me to never assume any ordering in a dict/map/hashmap (whatever the term)
Is the ordering there at least fixed, or can it vary from run to run even on the same data, or between implementations or versions of the same implementation? EDIT: to clarify, I was asking about JavaScript there.
Re: Python dicts are now ordered
#7Javascript taught me to never assume any ordering in a dict/map/hashmap (whatever the term)
Re: Python dicts are now ordered
#8Javascript taught me to never assume any ordering in a dict/map/hashmap (whatever the term)
Re: Python dicts are now ordered
#9Javascript taught me to never assume any ordering in a dict/map/hashmap (whatever the term)
Is the ordering there at least fixed, or can it vary from run to run even on the same data, or between implementations or versions of the same implementation? EDIT: to clarify, I was asking about JavaScript there.
Numeric keys get sorted. String keys are insertion-order. If key order is a priority, a Map should be used instead. Often when JavaScript's objects are used and a particular sort order is required, an accompanying (sorted) array is used.