~/talk

Lazy-Freeze: Another Look at Hashing and Immutability

Talkat PyCon Israel 2025 · on Tuesday, 2025-09-09· [python, compilers-and-language-design]
links:none on file
slides:none on file

A technique is presented that makes objects turn immutable when their hash is first computed, implemented as a class decorator called lazy_freeze published on PyPI; it wraps attribute setters, delattr, __setitem__/__delitem__ and in‑place operators so numpy and container subclasses are protected, offers a debug mode that records the stacktrace of the hash call, and a frozen_attributes option to only lock fields used by a custom __hash__ implementation. The decorator works and the author used it to find a caching bug; threading still requires caution.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 3:24Hashing and immutability basics
  3. 5:41First implementation attempt
  4. 11:14Working demo and solution
  5. 12:20Packaging the solution
  6. 16:23Advanced features and use cases
  7. 18:55Summary and Q&A
~/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.