-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Doc: Clarify dict equality irrespective of ordering. #16266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Despite dicts now maintaining insertion order, `{'a':1, 'b':2} == {'b':2, 'a':1} >>> True` - and presumably will stay accurate due to the magnitude of such a breaking change.
I think by same here it's implicit that order is not considered for dict comparison but making it explicit doesn't seem to hurt though. cc: @rhettinger |
Agreed, but the question was posed in the Python room on stackoverflow by a maintainer, so I similarly figured it wouldn't hurt, presuming this is behaviour intended to remain going forward. |
Thanks @toonarmycaptain for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
I'm having trouble backporting to |
GH-16276 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit 3171d67) Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
Thanks @toonarmycaptain for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit 3171d67) Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
GH-16277 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit 3171d67) Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
(cherry picked from commit 3171d67) Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
Thank you for your PR, this one has been merged into master, 3.8 and 3.7 |
Despite dicts now maintaining insertion order,
{'a':1, 'b':2} == {'b':2, 'a':1} >>> True
- and presumably will stay accurate due to the magnitude of such a breaking change.