Skip to content

Replace OrderedDict with standard dictionaries where possible #427

@coreyostrove

Description

@coreyostrove

In many parts of the codebase we opt to use OrderedDict instead of standard dictionaries in places where having dictionaries 'sorted' by insertion order is important. This is now mostly a vestige from pre-python 3.6/7 days when the standard python dictionary implementation did not remember insertion order, and made no guarantees on the order of returned elements from an iterated dictionary (the change in CPython was made in 3.6, and the announcement that this behavior was now part of the official language spec for all implementations was made with 3.7). This is no longer true, and so for most intents and purposes these two classes are now equivalent. I personally think that switching over to using standard dictionaries would improve readability in most places, but am open different perspectives. Thoughts?

Metadata

Metadata

Assignees

Labels

enhancementRequest for a new feature or a change to an existing featurelow priorityDevelopers should be aware of this issue, but it need not be addressed imminently

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions