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

Function choplist

pattern/web/pdf/utils.py:91–99  ·  view source on GitHub ↗

Groups every n elements of the list.

(n, seq)

Source from the content-addressed store, hash-verified

89
90# choplist
91def choplist(n, seq):
92 """Groups every n elements of the list."""
93 r = []
94 for x in seq:
95 r.append(x)
96 if len(r) == n:
97 yield tuple(r)
98 r = []
99 return
100
101# nunpack
102def nunpack(s, default=0):

Callers 6

loadMethod · 0.90
lookupMethod · 0.90
do_keywordMethod · 0.90
nextobjectMethod · 0.90
get_widths2Function · 0.90
do_keywordMethod · 0.90

Calls 2

lenFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…