~/talk

An Exploration of Python's Upcoming Match Statement

Talkat PyOhio 2021 · on Saturday, 2021-07-31· [python]
links:none on file
slides:none on file

Python 3.10’s match statement implements PEP-634 style structural patterns: literal and or patterns for alternatives, capture patterns (underscore as wildcard) that bind values, sequence unpacking with starred captures, and mapping patterns that require specific keys but ignore extra data. Class patterns do isinstance checks plus attribute subpatterns. Examples include an event dispatcher using attribute checks and a FizzBuzz implemented by matching a remainder tuple; demos run and behave like the spec says.

AI-written summary · about

  1. 0:00Introduction
  2. 0:26Match Statement Example
  3. 3:18Sequence Patterns
  4. 4:51Mapping Patterns
  5. 5:34Fake Scenario
  6. 6:35Class Patterns
  7. 7:21Handling Events
  8. 8:41Fizzbuzz
  9. 9:21Outro
~/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.