4.10.2021 Python 3.10 has been released. Among other updates, the ability to use the design was providedswitch-casewhich is called structural pattern matching, orpattern matching

How to use this construction?

The question was created in order to have information aboutpattern matchingin Russian. This question is not covered regarding python 3.10 on ruSO

I suggest you and fill out the answer docs.python.org/3/whatsnew/... :) Interesting innovation

gil9red2021-10-13 09:49:14

Yes, I will do so if there are no volunteers or the question is not closed=)

Dmitry2021-10-13 09:54:22

Also shocked. How many years it has been explained to everyone that such a construction is not needed in the language, and that if-elif-else is enough for all occasions. And here on you ... :)

GrAnd2021-10-13 10:25:11