How to match positive integer in Python?
match n:
case >=0:
print('positive int')
Causes a syntax error
More succinctly than
match n:
case n if n >= 0:
I want to match all of these cases:
case n is not a non-negative integer
case n == 0
case n == 1
case n > 1