
On 06/24/2020 08:57 AM, misha@drach.uk wrote:
To me match also sound confusing as a keyword. You don't match things to cases in English.
Maybe match x: against 1? https://idioms.thefreedictionary.com/match+against
Python uses English words, but is not English. Having said that, you can "match against several cases" to see which one is what you are looking for: Google search, not sure which dictionary, said:
noun: case; plural noun: cases 1. an instance of a particular situation; an example of something occurring.
So in your example we have three cases of interest: - point is Point(?, 1) - point is Point(1, ?) - point is None So we are matching the point given against three different cases, and match <thing>: case <1>: # blah case <2>: # blah case <3>: # blah flows naturally from that. -- ~Ethan~