Guido van Rossum <gu...@python.org> added the comment:

> 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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42128>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to