~/talk

Fine Grained Error Locations in Tracebacks

Talkat PyCon Israel 2022 · 2022-06-28..06-29· [python, compilers-and-language-design]
name:Ron Alfia
links:none on file
slides:none on file

Python 3.11 embeds fine-grained error location metadata in bytecode so tracebacks show exact column positions inside a source line, not just the line number, and those markers propagate up the call stack to identify which sub-expression raised the exception. Implementation adds two column offsets to pyc/pycache files, reducing time spent opening debuggers or adding prints but increasing storage; a pyc metadata opt-out flag lets builds skip the extra data.

AI-written summary · about

  1. 0:00Introduction to Python 3.11
  2. 2:38Motivation for fine-grained errors
  3. 8:51How Python tracebacks work
  4. 12:23Fine-grained error location feature
  5. 14:15Memory cost and opt-out option
  6. 15:42Example with dictionary access
  7. 17:09Error markers in call stack
  8. 17:51Summary and benefits
  9. 18:55Q&A about memory impact
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.