networkx/networkx — pull request #799 by sbromberger (2012-12-20 17:11:32+00:00)
Title: Add "append" capability to edge data to provide updates to the...

... same keys to edges without overwriting existing data. This is helpful, for instance, for keeping track of path roots.

Example:

>>> g = nx.Graph()

>>> g.add_edge(1, 2, root=1)
>>> g.add_edge(1, 2, append = True, root=2)
>>> g.edges(data=True)
[(1, 2, {'root': [1, 2]})]

Modifications to add_edge and add_edges_from, which will cascade to add_path and others.