Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 298
Dict comparisons insensitive to order #1788
Copy link
Copy link
Closed
Labels
backlogIssues to address with priority for current development goalsIssues to address with priority for current development goalsdiscussionDiscussions related to the design, implementation and operation of the projectDiscussions related to the design, implementation and operation of the project
Milestone
Description
Metadata
Metadata
Assignees
Labels
backlogIssues to address with priority for current development goalsIssues to address with priority for current development goalsdiscussionDiscussions related to the design, implementation and operation of the projectDiscussions related to the design, implementation and operation of the project
Description of issue or feature request:
In #1783 we dropped support for Python 3.6 and inside this pr, we decided to drop
OrderedDicts as well: e3b267e.The argument was that inside python 3.7+ dictionaries insertion order is preserved: https://docs.python.org/3/whatsnew/3.7.html.
Even though the insertion order is preserved we should keep in mind that there are still differences between
OrderedDicts and regular dictionaries like when comparing them:The question is:
Is it a problem if we have two dictionaries with data in a different order that are not the same?
If yes we have two solutions:
__eq__implementations make sure this will happen:or in other words where we are using dictionaries make sure when comparing them that the order makes a difference.