On Wed, Jul 8, 2020 at 7:03 AM Kerwin Sun <[email protected]> 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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/2Y2GROC3IRLGUMXHHVFPODOZG35KYBOE/
Code of Conduct: http://python.org/psf/codeofconduct/