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

Function dedup

Lib/test/test_code.py:1361–1365  ·  view source on GitHub ↗
(lst, prev=object())

Source from the content-addressed store, hash-verified

1359 yield (line, end_line, col, end_col)
1360
1361def dedup(lst, prev=object()):
1362 for item in lst:
1363 if item != prev:
1364 yield item
1365 prev = item
1366
1367def lines_from_postions(positions):
1368 return dedup(l for (l, _, _, _) in positions)

Callers 2

lines_from_postionsFunction · 0.85
check_linesMethod · 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…