Commit 4e1630e
Brandon Heller
topo: add __getitem__ for Graph
Commit 65c35b6 'Remove networkx dependency' broke this line from RipL:
nodes = [n for n in self.g[name] if self.layer(n) == layer]
To work around this, RipL code would have to be changed to something
like this:
nodes = [n for n in self.g.data[name] if self.layer(n) == layer]
...which would use an internal variable, data.
It seems cleaner to add this one little feature from NetworkX Graph objects.1 parent 40b13c2 commit 4e1630e
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
0 commit comments