On 4/11/20 4:36 am, Paul Svensson wrote:
On Tue, 3 Nov 2020, Greg Ewing wrote:

once people start using "_" as a wildcard
in patterns, it will be too late to go back.

But will it, really ?
It seems to me, that if we leave the "_" magic out,
and leave "case x, x" to the linters,
that leaves a clear path forward
for whatever can be decided whenever it can be decided.

If "_" is a non-binding wildcard, linters will have to allow
"case _, _" otherwise it might as well not be there. And then
if it is later changed to be binding, "case _, _" will
either become invalid or start forcing the two occurrences to
be equal, depending on which change is made, thus breaking
existing code.

The only way I can see to keep our future options open in this
area is not to have a wildcard at all, and make people use
a different throwaway name for each don't-care position in a
pattern.

--
Greg
_______________________________________________
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/RVTWRZ7NM2OWLCXFXJLNYA66GKXYHADN/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to