~/talk

Become a Better Pythonista by Abusing List Comprehensions and :=

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

Covers concrete gotchas: the walrus operator assigns inside expressions but evaluation order can raise NameError when the right side runs before the left; wrapping a call in a lambda to delay execution lets a function be defined as an argument and avoids immediate errors; demonstrates a one‑line recursive function that technically works but is unreadable; shows how generator laziness can defer side effects (even mutating globals) and how nested comprehension order is reversed, causing undefined variables.

AI-written summary · about

  1. 0:00Introduction to Python tricks
  2. 1:07Walrus operator order of execution
  3. 4:58Recursive function in one line
  4. 8:50Why abuse these tricks
  5. 12:08Comprehensions and generators
  6. 13:34Generator trick in function calls
  7. 14:18Global variable side effects
  8. 17:10Nested comprehensions pitfalls
  9. 18:37Final example walkthrough
  10. 19:43Performance and readability
~/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.