On 2020-06-23 22:50, Barry Warsaw wrote:
On Jun 23, 2020, at 14:31, Chris Angelico firstname.lastname@example.org 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.
However, what if you wanted to match Ellipsis?
This could lead to bugs:
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:"?