Serhiy Storchaka <[email protected]> added the comment:
Batuhan, unfortunately your second solution does not work too, because continue
and break can be conditional. For example:
def simple(x):
for number in range(2):
try:
return number
finally:
if x:
continue
print(simple(0))
print(simple(1))
It should print:
0
None
Ethan, your understanding is correct.
----------
keywords: +3.8regression -patch
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37830>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com