This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: retrun collection item in for cycle with finally continue
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: out of date
Dependencies: Superseder: continue and break in finally with return in try results with segfault
View: 37830
Assigned To: Nosy List: serhiy.storchaka, Иван Косматых
Priority: normal Keywords:

Created on 2019-08-30 10:58 by Иван Косматых, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg350867 - (view) Author: Иван Косматых (Иван Косматых) Date: 2019-08-30 10:58
https://bugs.python.org/issue32489
This closed issue allow continue in finally clasue but now it can lead to crash in below case.

def crash():
    for i in [1, 2, 3]:
        try:
            return i
        finally:
            continue


crash()

I try use Python 3.8.0b3 (default, Aug  1 2019, 21:20:41) on ubuntu Linux 4.15.0-55-generic #60~16.04.2-Ubuntu SMP Thu Jul 4 09:03:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
msg350870 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-08-30 11:07
Thank you for your report, but this has been fixed in issue37830. Try 3.8.0b4!
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82168
2019-08-30 11:07:08serhiy.storchakasetstatus: open -> closed
superseder: continue and break in finally with return in try results with segfault
messages: + msg350870

resolution: out of date
stage: resolved
2019-08-30 10:58:46Иван Косматыхcreate