~/talk

Debugging Stories from an Advanced Python Class

TalkinSpanishat PyCon US 2020 · 2020-04-15..04-23· [python]
links:none on file
slides:none on file

Four concrete Python debugging stories with reproducible code and fixes: a broad except hiding a NameError fixed by catching specific exceptions; redefining builtins breaking input by shadowing names, fixed by avoiding reserved names; using unittest.mock.patch with side_effect set to a string causing iteration over characters (use a list or tuple instead); and applying MagicMock to a module reference leaking changes to other tests, fixed by backing up and restoring the original function.

AI-written summary · about

  1. 0:00Introduction
  2. 1:09File not found exception
  3. 3:37Input function error
  4. 7:08Code validation and unit tests
  5. 12:08Reusing code blindly
  6. 13:12Copy vs reference issues
  7. 16:45Takeaways and closing
~/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.