[issue37830] continue in finally with return in try results with segfault
Serhiy Storchaka
report at bugs.python.org
Tue Aug 13 12:09:46 EDT 2019
Serhiy Storchaka <storchaka+cpython at gmail.com> 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 <report at bugs.python.org>
<https://bugs.python.org/issue37830>
_______________________________________
More information about the Python-bugs-list
mailing list