Practical usage of advanced Python constructs
summary
Uses real code from projects and libraries: generator-based chunks iterator streams HTTP responses so the whole body never loads into memory; a flattening generator from Django and recursive os.walk-style traversal; a simple per-IP rate-limit decorator that blocks after 10 calls per minute; a time out decorator implemented with SIGALRM (Linux only) to kill long-running calls; caching-decorator patterns (including a property cache) and session/transaction context managers that deterministically close or commit/rollback resources.
AI-written summary · about
chapters (17)
- 0:00Python
- 2:17Iterators
- 4:56Control flow with generators
- 5:45View of iterable map & filter
- 7:24Complicated flatten
- 7:53Save memory
- 11:05Django cycle
- 14:00Decorators
- 14:30Can do
- 15:06Discovery & metadata
- 16:39Call or not
- 18:22Caching
- 19:54Dogpile
- 20:49Ansible
- 23:16Context managers
- 25:44Digging deeper
- 26:32Debug








