The sixth alpha version of the Python 3.10 was released today (the final release is planned for October). It introduces (with PEP 634) new great feature — pattern matching. Let’s see how it works!

Like a switch

The syntax a little bit resembles the switch statement, known from the other programming languages:

from…

Maciej Michalec

Software engineer interested in functional programming, various programming languages and compilers construction.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store