Message349579
Note, that we have a regression in 3.8. There is a use case for "break" in "finally", and such code is even used in the stdlib. And who know in what third-party code it is used. In specific circumstances (see msg349513) it now can cause a crash. Other example:
import contextlib
def simple():
with contextlib.nullcontext():
for number in range(2):
try:
return number
finally:
break
simple()
It just raise an exception in 3.8, not crash:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 7, in simple
TypeError: 'range_iterator' object is not callable |
|
Date |
User |
Action |
Args |
2019-08-13 16:18:41 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, eric.smith, ethan.furman, lukasz.langa, Mark.Shannon, ppperry, pablogsal, xtreak, BTaskaya |
2019-08-13 16:18:41 | serhiy.storchaka | set | messageid: <1565713121.26.0.516225895032.issue37830@roundup.psfhosted.org> |
2019-08-13 16:18:41 | serhiy.storchaka | link | issue37830 messages |
2019-08-13 16:18:40 | serhiy.storchaka | create | |
|