Message387369
> It's not a huge deal, but I vote that we either drop or rework the "http_error" examples. I think it gives people a very wrong first impression that makes the rest of the behavior quite surprising.
>
> Can it be changed to build off of something familiar, like unpacking? I like 636's approach much more.
So 636 Appendix A is identical to the tutorial in the README of the patma repo. It uses http errors for the very first example only, which introduces literal matching. The main text of 636 is too long for what's new IMO, and also a bit unfinished. It is meant as a gentle intro. The Appendix is meant as an intro to pattern matching for experienced Python users (the kind of people for whom the what's new series of documents is written). This tutorial takes the user from the simplest forms of patterns (literals) via more complex ones (tuples, classes) to advanced concepts like nesting patterns, and then just lists a whole bunch of other features. I started with http errors because 404 must be the world's famous number by now, well before pi or even 0 and 1. :-)
See for yourself: https://github.com/python/cpython/pull/24588 |
|
Date |
User |
Action |
Args |
2021-02-19 23:43:51 | gvanrossum | set | recipients:
+ gvanrossum, willingc, Daniel Moisset, lys.nikolaou, pablogsal, brandtbucher, BTaskaya, kj |
2021-02-19 23:43:51 | gvanrossum | set | messageid: <1613778231.69.0.92137101366.issue42128@roundup.psfhosted.org> |
2021-02-19 23:43:51 | gvanrossum | link | issue42128 messages |
2021-02-19 23:43:51 | gvanrossum | create | |
|