On Fri, 26 Jun 2020 at 03:37, Gregory P. Smith <g...@krypto.org> wrote:
>
> Litmus test: Give someone who does not know Python this code example from the 
> PEP and ask them what it does and why it does what it does:
>
> match get_shape():
>     case Line(start := Point(x, y), end) if start == end:
>         print(f"Zero length line at {x}, {y}")
>
> I expect confusion to be the result.  If they don't blindly assume the 
> variables come from somewhere not shown to stop their anguish.
>
> With Python experience, my own reading is:

With Python experience *and limited use of other languages with match
constructs*, this reads naturally to me and makes instant sense.
Clearly it's unreasonable to expect all users to have multi-language
experience, but I'd argue that my experience demonstrates that
"limited use of constructs like this" is enough to understand the
proposed syntax. And therefore, that once it's added to Python, it
won't take long for people to become sufficiently familiar with it to
handle fairly complex examples.

Paul
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/3SZXT3GULG6NX55T4HAQM3TBURGR3PUZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to