~/talk

Python idioms to help you write good code

Talkat EuroPython 2015 · 2015-07-20..07-26· [career-development]
links:none on file
slides:none on file

States concrete rules: module layout orders stdlib then third‑party then app imports, constants and exceptions up top, and use absolute imports for large projects; prefer classmethods for alternate constructors; avoid mutable defaults and class attributes by initializing in __init__; use pep8 and linters (pylint, pyflakes, flake8); prefer comprehensions are fastest for sequence loops and use join over repeated + for many strings; keep hot code inside try blocks because exceptions are expensive; refactor nested ifs with continue/return.

AI-written summary · about

  1. 0:00Introduction
  2. 1:37Coding conventions
  3. 2:45Python module layout
  4. 5:43Naming and imports
  5. 6:44Common coding patterns
  6. 11:16Code evolution
  7. 13:22Performance idioms
  8. 16:02Avoiding nested logic
  9. 17:14Mutability and data
  10. 20:14Language gotchas
  11. 22:18Tuples and commas
  12. 24:52Python development tools
  13. 25:53Q&A session
~/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.