mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
These get to live next to the existing library and query tests, and are run as part of both the Python 2 and Python 3 language tests.
12 lines
174 B
Python
12 lines
174 B
Python
match x:
|
|
case 2:
|
|
pass
|
|
case n:
|
|
print(n, 'not allowed')
|
|
|
|
match x:
|
|
case n if n > 0:
|
|
pass
|
|
case _:
|
|
print('only positives allowed')
|