Returns a list copy in which each item occurs only once (in-order).
(iterable)
| 301 | return dict.get(self, self.graph.get(node, node), default) |
| 302 | |
| 303 | def unique(iterable): |
| 304 | """ Returns a list copy in which each item occurs only once (in-order). |
| 305 | """ |
| 306 | seen = set() |
| 307 | return [x for x in iterable if x not in seen and not seen.add(x)] |
| 308 | |
| 309 | # Graph layouts: |
| 310 | SPRING = "spring" |