MCPcopy Index your code
hub / github.com/python/cpython / interleave

Method interleave

Lib/_ast_unparse.py:62–72  ·  view source on GitHub ↗

Call f on each item in seq, calling inter() in between.

(self, inter, f, seq)

Source from the content-addressed store, hash-verified

60 self._in_interactive = False
61
62 def interleave(self, inter, f, seq):
63 """Call f on each item in seq, calling inter() in between."""
64 seq = iter(seq)
65 try:
66 f(next(seq))
67 except StopIteration:
68 pass
69 else:
70 for x in seq:
71 inter()
72 f(x)
73
74 def items_view(self, traverser, items):
75 """Traverse and separate the given *items* with a comma and append it to

Callers 15

items_viewMethod · 0.95
visit_FunctionTypeMethod · 0.95
visit_ImportMethod · 0.95
visit_ImportFromMethod · 0.95
visit_DeleteMethod · 0.95
visit_GlobalMethod · 0.95
visit_NonlocalMethod · 0.95
_type_params_helperMethod · 0.95
visit_WithMethod · 0.95
visit_AsyncWithMethod · 0.95
visit_ListMethod · 0.95
visit_SetMethod · 0.95

Calls 1

fFunction · 0.70

Tested by

no test coverage detected