Episode 81: Exploring the New Features of Python 3.10
Oct 08, 2021 54m
Python 3.10 is here! This week on the show, two former guests and Real Python authors return to talk about the new version. Geir Arne Hjelle’s article was posted to the site Monday, and it’s titled “Python 3.10: Cool New Features for You to Try”. Christopher Trudeau’s video course came out on Tuesday, and it covers the topics from the article with multiple visual examples of Python 3.10 code.
Geir Arne and Christopher worked together to create code examples of the new features used in both. We talk about more user-friendly error messages, structural pattern matching, enhancements to Python’s type system, and much more.
Geir Arne and Christopher not only cover the new features but they offer advice about ways you might incorporate them into your code. We also discuss what you should think about before running the new version for your projects.
Course Spotlight: Cool New Features in Python 3.10
In this course, you’ll explore some of the coolest and most useful features in Python 3.10. You’ll appreciate more user-friendly error messages, learn about how you can handle complicated data structures with structural pattern matching, and explore new enhancements to Python’s type system.
- 00:00:00 – Introduction
- 00:02:20 – Better Error Messages
- 00:07:14 – Structural Pattern Matching
- 00:14:14 – Sponsor: Snyk
- 00:14:55 – Type Unions, Aliases, and Guards
- 00:22:34 – Future Annotations
- 00:26:46 – Stricter Zipping of Sequences
- 00:28:30 – New Functions in the statistics Module
- 00:31:46 – Video Course Spotlight
- 00:32:50 – Asynchronous Iteration
- 00:38:59 – Default Text Encodings
- 00:41:33 – Context Manager Syntax
- 00:43:19 – Modern and Secure SSL
- 00:45:10 – Should you upgrade now?
- 00:49:59 – How to Detect Python 3.10 at Runtime
- 00:53:07 – Thanks and goodbye
- About Geir Arne Hjelle: Real Python Team Profile
- About Christopher Trudeau: Real Python Team Profile
- Python 3.10: Cool New Features for You to Try: Real Python Article
- Cool New Features in Python 3.10: Real Python Video Course
- Python 3.10.0 Released: python.org
- Better error messages: What’s New docs.python.org
- PEP 634: Structural Pattern Matching - Specification
- PEP 635: Structural Pattern Matching - Motivation and Rationale
- PEP 636: Structural Pattern Matching - Tutorial
- PEP 604: Allow writing union types as X | Y
- PEP 613: Explicit Type Aliases
- PEP 647: User-Defined Type Guards
- PEP 612: Parameter Specification Variables
- Using the Python zip() Function for Parallel Iteration: Real Python Article
- statistics — Mathematical statistics functions: docs.python.org
- PEP 525: Asynchronous Generators
- Context Managers and Python’s with Statement: Real Python Article
- Run Python Versions in Docker: How to Try the Latest Python Release: Real Python Article