~/talk

Abstract tricks: how abstract base classes can help you to solve difficult challenges.

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [python]
links:none on file
slides:none on file

Shows a concrete library: a regex translator that expands XML Schema shorthands into Python regexes and compiles them, an implementation of XML Schema atomic types using ABCMeta to override instance checks, and a memory‑efficient character set implemented as a mutable subset set keyed on ~6,000 Unicode intervals to avoid loading all ~150,000 assigned code points. The regx subpackage is ~2,000 lines, passes ~50,000 tests, and uses ABCMeta instance check and proxy types to reuse built‑in types while enforcing schema validation.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:55Abstract base classes overview
  3. 7:06Benefits of ABCs in code
  4. 10:43XML regex processing challenge
  5. 17:39Unicode subsets with ABCs
  6. 21:03Atomic types and expat data
  7. 25:00Proxy classes for type checks
  8. 27:14Conclusion and summary
~/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.