networkx icon indicating copy to clipboard operation
networkx copied to clipboard

Review the `.update` method of graph classes

Open rossbar opened this issue 2 years ago • 1 comments

This is an action-item extracted from the discussion in #4208.

The graph classes have an update method which is intended to add the nodes/edges from one graph to another (similar to dict.update). There is a comment in #4208 that the implementation is not particularly easy to understand, nor is it 100% clear that it will work for all graph types (e.g. are multigraph edge keys preserved?). It would be a good idea to review the method, see if it can't be refactored to be more readable, and to ensure that testing is sufficient for all use-cases.

rossbar avatar Jun 28 '22 11:06 rossbar