A list of code examples, notes, and slides used in class. This page generally will be added to shortly before or shortly after the class (or sometime both).
race.py
demo threading with a race condition (in particular, a data race).
packer.py
demo threading with a race condition (involving a producer and consumer).
ui_thread.py
which we’ll complete in class to use a user interface threading pattern.
classes.py
with classes and type annotations.comprehensions.py
with list, set, and dict comprehensions, both helpful and confusing.decorators.py
with first-class functions, decorators, and the Collatz conjecture.async.py
with async
, await
, and a few simple asyncio functions.