Hello,

On Tue, 20 Oct 2020 00:00:49 +0200
Thomas Wouters <tho...@python.org> wrote:

> One of the problems I have with the Pattern Matching proposal (PEP 622
> originally, now PEPs 634, 635, 636) is the special-casing of '_' to
> not actually assign to the name, which is a subtle but meaningful
> divergence from the rest of Python. In discussions with the authors I
> proposed using '?' instead *and* extending that to existing unpacking

One problem with this PEP, which I didn't see mentioned in the other
replies, is that it tries to grab "?" character, which is already
sought-for by another pending PEP: "PEP 505 -- None-aware operators",
https://www.python.org/dev/peps/pep-0505/ .

Use of "?" in PEP640 can be disambiguated enough from PEP505's "??",
"?.", "?[" from a compiler token perspective perspective, but what about
confusion/clarity to humans:

?, ?, c = a
d = b?.c
?, c = b ?? (None, 2)
e = b?[i]


(And PEP 505 would need to be addressed sooner or later, now that it's
part of other mainstream languages. In Python's conceptual debt tower,
non-aware operators definitely precede pattern matching).

[]

-- 
Best regards,
 Paul                          mailto:pmis...@gmail.com
_______________________________________________
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/RWG25CCT22OYXVNGJ4EKXQE74GBLZUWY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to