Skip to main content

Software-Engineering

Why the Hardest Concept for Python Devs Is Concurrency: asyncio vs threading vs multiprocessing

Concurrency is arguably the hardest concept for Python developers, because the important ideas already assume you understand the operating system underneath. In this chapter, we start from the kernel and system calls, build up processes, threads, race conditions, and the GIL, then work out when to reach for asyncio, threading, or multiprocessing, why a GPU beats a CPU on the same arithmetic, and how to get better at concurrent programming.

PhD in Python Functions

From kindergarten to PhD, this may be the most comprehensive chapter on Python functions. We start with the basics of defining and calling functions, learn how to write them well, then learn closures, decorators, recursion, and generators, all the way to theory of computation and how CPython executes functions under the hood.