On Wed, 8 Jul 2020, Rhodri James wrote:
On 08/07/2020 11:05, Federico Salerno wrote:
What I don't like is the use of _ as catch-all, which is different and not
interdependent with its use as throwaway.
Any name used as a pattern is a catch-all. The only difference between "case
dummy:" and "case _:" is that "_" doesn't bind to the thing being matched, but
"dummy" does bind to it.
Does "_" really deserve that special treatment ?
If you don't want to bind to it, you can just use some other dummy,
same way you don't use "case print:" if you don want to bind that.
/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/KGCQDEFXKOPKPXFF7F6LYZKYFCHGVW5X/
Code of Conduct: http://python.org/psf/codeofconduct/