mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
Update 28_exception.py
This commit is contained in:
parent
4a81e975c8
commit
6e9dd9516b
@ -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():
|
||||
|
Loading…
x
Reference in New Issue
Block a user