~/lightning

Ignite Talk - 2019 Python Gotchas, Tips, and Tricks

Lightningat PyColorado 2019 · 2019-09-07..09-08· [python]
links:none on file
slides:none on file

Three concrete gotchas with concrete fixes: chained comparisons act as range checks so a b c parses as (a b) and (b c) not left association; and/or return operands so x and y yields x when x is falsy and x otherwise, causing surprising assignments; and mutable default arguments persist where a default list accumulates across calls — fix by using None (or another immutable) and creating the container inside the function.

AI-written summary · about

~/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.