MCPcopy Index your code
hub / github.com/ipython/ipython / ranges

Function ranges

tests/test_completer.py:76–79  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

74 valid.append(c)
75
76 def ranges(i):
77 for a, b in itertools.groupby(enumerate(i), lambda pair: pair[1] - pair[0]):
78 b = list(b)
79 yield b[0][1], b[-1][1]
80
81 rg = list(ranges(valid))
82 lens = []

Callers 1

recompute_unicode_rangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…