Control Flow and Concurrency

This part is about the moments when Python’s control flow stops being plain if/for/while and starts being something else: an iterator’s __next__, a context manager’s __enter__/__exit__, a coroutine’s await, a thread’s Lock. Each one is a contract; this part is about what each contract promises.