On Wed, Jul 8, 2020 at 7:03 AM Kerwin Sun <sunkaihui...@gmail.com> wrote:

> I tried with this code:
>
[...]

> def whereis(point):
>         case w:
>              print("Not the answer, local w")
>         case z:
>              print("The answer")
>         case _:
>              print("other")
> whereis(42)


 w, z and _ are all equivalent here, therefore it will take the first
matching branch. The very first post about 622 contained a caveat that case
_: will never be reached if case identifier: exists instead. Equivalent
branches are only ignored, not illegal.
_______________________________________________
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/2Y2GROC3IRLGUMXHHVFPODOZG35KYBOE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to