37 lines
627 B
Python
37 lines
627 B
Python
# flags: --minimum-version=3.10
|
|
# This file uses pattern matching introduced in Python 3.10.
|
|
|
|
|
|
match http_code:
|
|
case 404:
|
|
print("Not found")
|
|
|
|
|
|
with \
|
|
make_context_manager1() as cm1, \
|
|
make_context_manager2() as cm2, \
|
|
make_context_manager3() as cm3, \
|
|
make_context_manager4() as cm4 \
|
|
:
|
|
pass
|
|
|
|
|
|
# output
|
|
|
|
|
|
# This file uses pattern matching introduced in Python 3.10.
|
|
|
|
|
|
match http_code:
|
|
case 404:
|
|
print("Not found")
|
|
|
|
|
|
with (
|
|
make_context_manager1() as cm1,
|
|
make_context_manager2() as cm2,
|
|
make_context_manager3() as cm3,
|
|
make_context_manager4() as cm4,
|
|
):
|
|
pass
|