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: compiler module builds incorrect AST for TryExceptFinally
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: adimasci, georg.brandl
Priority: normal Keywords:

Created on 2006-06-20 08:17 by adimasci, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
astbug.py adimasci, 2006-06-20 08:17 snippet to illustrate the problem
Messages (3)
msg28848 - (view) Author: Adrien Di Mascio (adimasci) Date: 2006-06-20 08:17
the finally clause in a try ... except ... finally
statement is seen as a "else" clause by transformer.py.
There is no special code to handle finally clauses for
a try / except node

(Maybe ast.TryExcept should accept a finally_ argument
after the else_ one)

Python version : 2.5b1 (r46858)

msg28849 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-06-20 15:57
Logged In: YES 
user_id=849994

Thanks for reporting! I fixed this and will commit as soon
as the trunk is unfrozen.
msg28850 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-06-21 17:45
Logged In: YES 
user_id=849994

Fixed in rev. 47057.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43529
2006-06-20 08:17:43adimascicreate