Closed
Description
I finally managed to write a match clause
match None in reso:
pass
match =ConflictResolution.MINE in reso:
pass
match =ConflictResolution.THEIRS in reso:
pass
match =ConflictResolution.NEXT in reso:
pass
it seems to work, but the syntax for comparison seems odd... it should be ==
not =
.
My initial confusion was how to refer to the "in" expression inside the match expression. There is no it
defined. The =X
syntax looks more like an assignment though, quite unpythonic.
Am I seeing this wrong?
Also, how would I check membership? match "1".in in expr
?
The documentation is leaving lots of questions and lacks good examples, imho.