gvanrossum / patma

Pattern Matching
1.02k stars 64 forks source link

Alternative OR symbol #146

Open gvanrossum opened 4 years ago

gvanrossum commented 4 years ago

At least two SC members don't like | and would prefer we spell this as or.

Arguments heard include:

To which my main response would be

But if I had to I could get used to or.

Tobias-Kohn commented 4 years ago

Again, agreed in every point. There is no really strong argument either way, and hence no actual reason not to go with |.

Perhaps a simple thought experiment: if Python had opted for || instead of or (like various C-based languages), would those in favour of or then also want to write case (1 || 2 || 3):? Does it really add something...?

gvanrossum commented 4 years ago

In the SC-VC we ended up deciding to keep the existing | symbol.

gvanrossum commented 3 years ago

Labeling as rejected (we're keeping |) and we've added discussion to PEP 635, so doesn't need more pep.