forked from lcompilers/lpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtry1.py
More file actions
43 lines (37 loc) · 631 Bytes
/
Copy pathtry1.py
File metadata and controls
43 lines (37 loc) · 631 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
for i in range(3, 0, -1):
try:
print()
except IOError:
if i == 1:
raise
print('retry')
else:
break
try:
pass
except ValueError:
pass
except TypeError:
pass
except ZeroDivisionError:
pass
except:
pass
try:
a = 1
if a <= 0:
raise ValueError("That is not a positive number!")
except ValueError as ve:
print(ve)
try:
raise KeyboardInterrupt
finally:
print('Goodbye, world!')
try: ...
except Exception as e: ...
try: ...
except: ...
else: ...
finally: ...
try: shutil.rmtree(os.path.join(asv_build_cache, c))
except OSError: pass