We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Pattern Matching in Python

Formal Metadata

Title
Pattern Matching in Python
Subtitle
Learning why Python and patterns are a perfect match
Title of Series
Number of Parts
115
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
When Python 3.10 comes out in October 2021, it will include a new feature called “Structural Pattern Matching”. Structural Pattern Matching has been a staple of functional programming languages, but it has recently appeared or been proposed as future additions to imperative and OOP programming languages (like JavaScript, C++, and Rust). It provides an elegant way of processing and deconstructing heterogeneous data structures, and it enables an alternative paradigm to method dispatch. As one of this feature's contributors, my goals in this presentation are to describe the motivation for this new functionality, present some of the problems that its use will effectively solve, and give a brief introduction of how to use it. This talk is aimed at intermediate Python developers (although a beginner will be able to understand it). After attending you should be able to understand not just how to use pattern matching, but also when it’s a good idea to use it and what are the possible pitfalls to avoid. There will be a Q&A session which could be a good chance to discuss your questions about why certain design decisions were made when introducing pattern matching into Python.