-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In [4]: for i in range(3):
...: try:
...: print i
...: a = i / 0.0
...: print a
...: except:
...: print "NG"
...: continue
...:
0
NG
1
NG
2
NG
In [5]: for i in range(3):
...: try:
...: print i
...: a = i / 0.0
...: print a
...: except:
...: print "NG"
...:
0
NG
1
NG
2
NG
In [5]: for i in range(3):
...: try:
...: print i
...: a = i / 0.0
...: print a
...: except:
...: print "NG"
...:
0
NG
1
NG
2
NG
In [6]: for i in range(3):
...: try:
...: print i
...: a = i / 0.0
...: print a
...: except:
...: print "NG"
...: print "hello"
...:
0
NG
1
NG
2
NG
hello
In [7]: for i in range(3):
...: try:
...: print i
...: except:
...: print "NG"
...: print "hello"
...:
0
1
2
hello
In [9]: def hoge():
...: for i in range(100):
...: try:
...: print i
...: a = i / 0.0
...: print a
...: except:
...: print "NG"
...: if i == 2:
...: return "hoge"
...:
In [10]: a = hoge()
0
NG
1
NG
2
NG
In [11]: a
Out[11]: 'hoge'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels