On 2020-06-23 22:50, Barry Warsaw wrote:
On Jun 23, 2020, at 14:31, Chris Angelico <ros...@gmail.com> wrote:
I can't find it among the rejected alternatives, but was it considered
to use "..." as the wildcard, rather than "_"? It carries similar
meaning but its special case of "this will never be bound" is simply
preventing an error, rather than making one otherwise-valid name
special.
I thought of that too as I was reading the PEP, but forgot to add it to my
notes. I do like ellipsis more than underscore here.
+1
However, what if you wanted to match Ellipsis?
This could lead to bugs:
>>> ...
Ellipsis
>>> Ellipsis = 0
>>> Ellipsis
0
>>> ...
Ellipsis
If you can have "case False:" and "case True:", should 'Ellipsis' become
a keyword so that you could have "case Ellipsis:"? Or do they have to be
"case .False:", "case .True:", in which case it could remain "case
.Ellipsis:"?
_______________________________________________
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/ZM6YWTIHNBJ6JJPTFOQNWIPIV4CO3UPX/
Code of Conduct: http://python.org/psf/codeofconduct/