DEV Community

Discussion on: Python 3.10 Structural Pattern Matching (Match Case)

Collapse
 
khatrivinay profile image
Vinay Khatri

PEP 622 says the pattern matching statement is inspired by the similar syntax found in Scala, Erlang, and other languages. And Scala itself compares its PATTERN MATCHING
syntax with Switch Case statements.
As the standard Python also does not support core Array data structure, still we compare Arrays with Python’s List which are poles apart. The objective of this article is just to tell that Python now supports a similar syntax to the Switch Case statement that is already supported by its biggest rivals.
Peace out....