MCPcopy Create free account
hub / github.com/clips/pattern / fsplit

Function fsplit

pattern/web/pdf/utils.py:52–61  ·  view source on GitHub ↗

Split a list into two classes according to the predicate.

(pred, objs)

Source from the content-addressed store, hash-verified

50
51# fsplit
52def fsplit(pred, objs):
53 """Split a list into two classes according to the predicate."""
54 t = []
55 f = []
56 for obj in objs:
57 if pred(obj):
58 t.append(obj)
59 else:
60 f.append(obj)
61 return (t,f)
62
63# drange
64def drange(v0, v1, d):

Callers 1

analyzeMethod · 0.90

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…