39 lines
585 B
Python
39 lines
585 B
Python
# flags: --minimum-version=3.11
|
|
# This file uses except* clause in Python 3.11.
|
|
|
|
|
|
try:
|
|
some_call()
|
|
except* Error as e:
|
|
pass
|
|
|
|
|
|
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 except* clause in Python 3.11.
|
|
|
|
|
|
try:
|
|
some_call()
|
|
except* Error as e:
|
|
pass
|
|
|
|
|
|
with (
|
|
make_context_manager1() as cm1,
|
|
make_context_manager2() as cm2,
|
|
make_context_manager3() as cm3,
|
|
make_context_manager4() as cm4,
|
|
):
|
|
pass
|