4 ms·
Why not just post PEP 636 -- Structural Pattern Matching: Tutorial https://www.python.org/dev/peps/pep-0636/ https://www.python.org/dev/peps/pep-0636/
by fireattack 6y ago
Why not just post PEP 636 -- Structural Pattern Matching: Tutorial
https://www.python.org/dev/peps/pep-0636/ https://www.python.org/dev/peps/pep-0636/
- simonw 6y agoPersonally found this GitHub repo easier to follow. It also includes a "launch binder" button which fires up a Jupyter Notebook running a fork of Python with the new syntax ready for people to try out interactively.
- h2odragon 6y agoAgreed; this explained things better for me than any of the other articles I've seen on the subject. I got to the "guard clauses" before horking this time.
- ZeroCool2u 6y agoThough that tutorial is comprehensive, as someone that's already relatively familiar with pattern matching, I've personally been looking for something a bit more terse. Mostly that points out the nuances of it in Python and this isn't too bad.