Lightning talk I held at https://pyconweb.com/ about how my Python idioms changed over the years, and how trying to write smart (but unreadable) code is bad :)
8. “Defensive programming” - gotta be sure …
name = None if user is None else user["name"]
# meh …
name = (user or {}).get("name")
# getting hard to read …