# SyntaxError: expected 'except' or 'finally' block; cannot have both 'except' and 'except*' on the same 'try' (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/syntaxerror-expected-except-or-finally-block-cannot-have-both-except-and-except-on-the-same-try-722c74d31b0b
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: python, syntaxerror, except*

compile of try body followed by unrelated statement, and of try with except* then except. Also return inside except* -> "'break', 'continue' and 'return' cannot appear in an except* block".
