https://benhoyt.com/writings/python-pattern-matching/
Ben Hoyt Home Resume/CV Projects Tech Writing Non-Tech Email benhoyt.com benhoyt@gmail.com September 2021 Summary: Python 3.10, which is due out in early October 2021, will include a large new language feature called structural pattern matching . This article is a critical but (hopefully) informative presentation of the feature, with examples based on real-world code. Go to: What it is | Where it shines | My code | Other projects | Problems | Wrapping up At a recent local Python meetup, a friend was presenting some of the new features in Python 3.8 and 3.9, and afterwards we got to talking about the pattern matching feature coming in Python 3.10. I went on a mild rant about how I thought Python had lost the plot: first assignment expressions using := , and now this rather sprawling feature. My friend interpreted my rant rather generously, and soon said, “it sounds li...