Python 3.11 Features, WASM Build, and Data Science Tips

·57m 21s
Shared point

Python News and Highlights

In this episode, we welcome guest Steve Dower, a CPython core developer, to discuss the latest advancements in running Python on Windows and beyond. We explore a variety of tools, emerging standards, and practical coding tips for the Python community.

FastAPI and Event Driven Architecture

We cover the FastAPI Events project, a lightweight tool for handling events in an asynchronous FastAPI application.
• Ideal for building structured notifications
• Can be integrated with external queues like AWS SQS
• Useful for debugging and monitoring distributed workloads

Defensive Programming for Data Science

We discuss an article by Peter Baumgartner on best practices for data scientists to integrate testing into their workflows.
• Use assert statements liberally for intermediate calculations
• Leverage Hypothesis to test assumptions about data shapes
• Implement schema validation using Pandera or Great Expectations

"Whenever you're visually inspecting the output, write an assert statement to do that analysis so that it’s always checked."

The Future of Python Async

Steve Dower explores the upcoming Exception Groups and Task Groups in Python 3.11.
Exception Groups: Allow bundling multiple exceptions when parallel tasks fail.
Except* Syntax: A new syntax to handle specific exceptions within a group, ensuring granular control.
Task Groups: Simplifies the async execution model by managing multiple parallel tasks within a context manager.

WebAssembly and CPython

A landmark update is the ability to compile CPython to WebAssembly (WASM).
• Enables Python to run directly in modern web browsers
• Supports both Emscripten and WASI build targets
• Opens doors for cross-platform apps using Electron

Libraries and Plotting

We examine PyOverload for function overloading in Python and discuss the Seaborn interface refactor, which aims to make domain-specific statistical graphics more accessible.

Topics

Chapters

7 chapters
Python Bytes
AI chat — answers grounded in episodes