On Spans See Python's PEP 657 – Include Fine Grained Error Locations in Tracebacks for more details on this topic.