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

Function normalize

Lib/traceback.py:867–869  ·  view source on GitHub ↗

Get character index given byte offset

(lineno, offset)

Source from the content-addressed store, hash-verified

865 lines = segment.splitlines()
866
867 def normalize(lineno, offset):
868 """Get character index given byte offset"""
869 return _byte_offset_to_character_offset(lines[lineno], offset)
870
871 def next_valid_char(lineno, col):
872 """Gets the next valid character index in `lines`, if

Callers 3

setup_positionsFunction · 0.70

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…