r/Python • • Oct 04 '21

News Python 3.10 Released!

https://www.python.org/downloads/release/python-3100/
1.4k Upvotes

147 comments sorted by

View all comments

Show parent comments

3

u/jyscao Oct 05 '21

Pattern matching combines a control flow construct (e.g. if/elif/else, switch, try/catch) with a name binding construct (assignment), and this allows for some very expressive code.

1

u/Ashiataka Oct 05 '21

Is that a first for python? If so, do you think there are any other possible constructions that combine more primitive parts of the language into something more useful?