~/talk

Code reloading: challanges, approaches & libraries

Talkat PyCon Israel 2025 · on Tuesday, 2025-09-09· [python, developer-experience]
links:none on file
slides:none on file

Python can update running code but semantics bite: def and class create new objects, default-arg captures and from-import copies keep old references, and renames linger in the interpreter. Two practical approaches appear: patch original objects (copy class dicts, swap function code objects) or update all pointers using GC referrers. Tools mentioned include importlib.reload, IPython autoreload and jurigged. A working case is an extended window manager that reloads its own code to avoid restarts; verbose logging proves essential to see what actually changes.

AI-written summary · about

  1. 0:00Introduction to code reloading
  2. 1:35Historical demo in Smalltalk
  3. 4:12Language support and ideology
  4. 6:45Basic Python reloading concepts
  5. 9:31Binding and function references
  6. 10:57Singleton initialization pattern
  7. 12:48Risks of renaming variables
  8. 13:11Class redefinition challenges
  9. 14:37Python's built-in reload function
  10. 17:10Pointer update approaches
  11. 17:31Handling multiple file dependencies
  12. 19:41Updating object pointers
  13. 21:27Reloading libraries overview
  14. 22:29Importance of verbose logging
  15. 23:41Choosing the right library
  16. 24:04Alternatives to code reloading
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.