From 6e9dd9516b49f83b01af4e9e82636dd2b28c6516 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 31 Aug 2025 01:52:18 +0800 Subject: [PATCH] Update 28_exception.py --- tests/28_exception.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/28_exception.py b/tests/28_exception.py index 9c174312..85828d6d 100644 --- a/tests/28_exception.py +++ b/tests/28_exception.py @@ -190,6 +190,17 @@ except KeyError: x = 5 assert x == 5 +a = [] +for i in range(6): + try: + [][1] + except IndexError: + if i == 2: + continue + else: + a.append(i) +assert a == [0, 1, 3, 4, 5] + """ # finally, only def finally_only():