On 2020-07-12 23:20, Guido van Rossum wrote:
[snip]
The need for a wildcard pattern has already been explained -- we really want to disallow `Point(x, y, y)` but we really need to allow `Point(z, _, _)`. Generating code to assign the value to `_` seems odd given the clear intent to *ignore* the value.

Using `?` as the wildcard has mostly disadvantages: it requires changes to the tokenizer, it could conflict with other future uses of `?` (it's been proposed for type annotations as a shorter version of Optional, and there's PEP 505, which I think isn't quite dead yet), and Python users have no pre-existing intuition for its meaning.

FWIW, I don't think this use of '?' would conflict with the other suggested uses because this use would be initial in an expression, whereas the other uses would be non-initial.

[snip]
_______________________________________________
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/D33YT2KBNVZS27JJIYA5BDWPIP5IWB7M/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to