~/talk

Match Case for Beginners

TalkinSpanishat PyCon US 2022 · 2022-04-27..05-03· [python]
links:none on file
slides:none on file

Introduces Python 3.10 structural pattern matching (match/case) and demonstrates using it with guards, sequence and starred patterns, and a tuple-of-remainders trick to solve seven concrete problems: word translation, month days, Roman numerals 1–1000, card ranking, FizzBuzz 1–100, a 9-element magic square, and flattening nested lists. Compares match/case implementations to alternatives (notably dictionaries), measures practicality and performance, and warns that the Roman-numeral example is an overuse that auto-generates matching code.

AI-written summary · about

  1. 0:00Start
  2. 8:05Translate Spanish words to English using the vocabulary from the song "Pollito Chicken".
  3. 15:47Convert any integer from 1 to 1000 to its corresponding Roman numeral value.
  4. 18:46From a card in a standard English deck represented as a tuple of rank, suit, determine its numerical value.
~/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.