How to use Python's pattern matching syntax well
10/1614:30 - 15:15
Xiao TanAdvanced Development in AsiaInfo
- AsiaInfo Advanced Development, former Ant Financial Development Engineer, many years of web front-end and back-end experience
- Currently engaged in the development of low-code, 3D visualization fields
Python 3.10's new syntax feature Structual Pattern Matching is just an enhanced version of switch case; I'll share what patterns are in pattern matching; pattern matching implementations for each language; what syntax Python's pattern matching supports, the advantages and disadvantages of using pattern matching; and do-it-yourself pattern matching. I will explain what pattern matching is, what syntax Python supports, the advantages and disadvantages of using pattern matching, and how to implement pattern matching yourself.