File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1308
1308
"name" : " python" ,
1309
1309
"nbconvert_exporter" : " python" ,
1310
1310
"pygments_lexer" : " ipython2" ,
1311
- "version" : " 2.7.10 "
1311
+ "version" : " 2.7.12 "
1312
1312
}
1313
1313
},
1314
1314
"nbformat" : 4 ,
Original file line number Diff line number Diff line change 17
17
while True : # This will keep looping until we break out.
18
18
# Here we use a try/except block to try to read the data as normal
19
19
# and to break out if unsuccessful - ie when we reach the end of the file.
20
- try :
20
+ try : # se arriva un errore nella sezione try passa direttamente alla except
21
21
# Read the next line
22
22
line = tide_file .readline ()
23
23
26
26
27
27
# If we do not have 5 words then it must be blank lines at the end of the file.
28
28
if len (words ) != 5 :
29
- break
29
+ break
30
30
except :
31
31
# If we failed to read a line then we must have got to the end.
32
32
break
You can’t perform that action at this time.
0 commit comments