Python 3 Deep Dive
Notes from the Python 3 Deep Dive series (Udemy). Course
Mental Model
- Everything is an object — functions and classes included; names are references bound to objects.
- Mutable vs immutable —
list/dict/setmutable;int/str/tupleimmutable. Drives copying, default-arg, and hashing gotchas. - Truthiness — empty containers,
0,None,""are falsy. isvs==— identity vs equality;isonly forNone/ singletons.- PEP 8 (style), PEP 20 (
import this).
Tooling
uv venv && source .venv/bin/activate # venv + installs (uv)
uvx ruff check . && uvx ruff format . # lint + format, no install
python -m pytest # tests