MCPcopy Index your code
hub / github.com/clips/pattern / unique

Function unique

pattern/graph/__init__.py:303–307  ·  view source on GitHub ↗

Returns a list copy in which each item occurs only once (in-order).

(iterable)

Source from the content-addressed store, hash-verified

301 return dict.get(self, self.graph.get(node, node), default)
302
303def 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:
310SPRING = "spring"

Callers 1

fringeMethod · 0.70

Calls 1

addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…