Repository navigation
Use dict instead of OrderedDict since dict is ordered by default from Python 3.6 - #4145
Merged
Merged
Conversation
dschult
approved these changes
Aug 10, 2020
rossbar
approved these changes
Aug 10, 2020
rossbar
left a comment
Contributor
There was a problem hiding this comment.
There are still some differences between OrderedDict and 3.6+ dictionaries (though they are indeed ordered by default). For example, the comparison operators are sensitive to order in OrderedDict, but not in dict:
>>> from collections import OrderedDict
>>> d1 = {1: '1', 2: '2'}
>>> d2 = {2: '2', 1: '1'}
>>> d1 == d2
True
>>> OrderedDict(d1) == OrderedDict(d2)
FalseAFAICT the affected code (i.e. _all_simple_paths_graph and _all_simple_paths_multigraph) don't depend on these properties, so the changes here LGTM; I just wanted to point it out!
Contributor
Author
jarrodmillman
added a commit
to mbruhns/networkx
that referenced
this pull request
Aug 11, 2020
* upstream/master: Update apt-get on circleci image (networkx#4147) MAINT: fixups to parse_edgelist. (networkx#4128) Use dict instead of OrderedDict since dict is ordered by default from Python 3.6. (networkx#4145) MAINT: Switch to abc-based isinstance checks in to_networkx_graph (networkx#4136) Add tree isomorphism (networkx#4067) Updated draw_networkx to accept numpy array for edgelist (networkx#4132) CI: temporary fix for CI latex installation issues (networkx#4131) Fix parse_edgelist behavior with multiple attributes (networkx#4125)
MridulS
pushed a commit
to MridulS/networkx
that referenced
this pull request
Feb 4, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4143