~/talk

Lazy-Freeze: A New Look at Hashing and Immutability

Talkat XtremePython 2025 · on Tuesday, 2025-11-18· [python, compilers-and-language-design]
links:none on file
slides:none on file

Lazy-Freeze makes objects start mutable and automatically become immutable when __hash__ runs, implemented as a class decorator that wraps __hash__, __setattr__, __delattr__ and in‑place ops; a demo fixes a corrupted LRU cache by raising an exception when mutation follows hashing. It captures the calling stack with an optional debug stack trace and limits protection to chosen attributes with a frozen_attrs option. A lock argument serializes hashtaken checks for thread safety; code is packaged and shown working in live examples.

AI-written summary · about

  1. 0:00Introduction and problem
  2. 2:39Hashing and immutability
  3. 4:50Building a magic object
  4. 9:26Demo of lazy-freeze
  5. 10:55Packaging the solution
  6. 13:23Handling C extensions
  7. 14:07Alternative to tuples
  8. 15:10Debugging features
  9. 16:13Threading considerations
  10. 19:28Locking mechanism
  11. 20:33Summary and takeaways
~/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.