Meaning & use
ordered dictionary
Last updated
Meaning
nouncountablecomputing
A data structure that stores key–value pairs and remembers the order in which the keys were inserted.
Grammar: Countable: use 'an ordered dictionary' or 'ordered dictionaries'.
Patterns
- an ordered dictionary of something
- store something in an ordered dictionary
Python's OrderedDict is an example of an ordered dictionary.
We used an ordered dictionary to keep the fields in the order the user entered them.
An ordered dictionary preserves insertion order, unlike a regular hash table.
Word forms
| plural | ordered dictionaries |
|---|
Common combinations
- ordered dictionary in Python
- The ordered dictionary in Python remembers the order of keys.
- insertion order
- An ordered dictionary maintains insertion order.
- key-value pairs
- The ordered dictionary stores key-value pairs.
Synonyms and how they differ
- ordered map
- Used in some programming languages; it means the same as ordered dictionary.
Word family
- dictionary noun
- A data structure that maps keys to values, often without a guaranteed order.
- sorted dictionary noun
- A dictionary that keeps its keys in sorted order, not insertion order.
Commonly confused: ordered dictionary or sorted dictionary?
ordered dictionary vs sorted dictionary
An ordered dictionary keeps items in the order they were added; a sorted dictionary keeps them in alphabetical or numerical order.
Practice
In computing, what does an ordered dictionary preserve?
Choose one answer.
An ordered dictionary remembers the order in which keys were inserted. Alphabetical or numerical order would be a sorted dictionary, not an ordered one.
Make it your own
Write a sentence using “ordered dictionary”, then check it and compare it with the examples above.