Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
Unfortunately, we cannot do much here. The reason is that the parser allows break and continue outside loops as they count as statements. As these are associated with control flow, is the compiler the one that will show the Syntax warning once it tries to make sense of the abstract syntax tree that the parser generates. The error you are getting happens because for the parser, the unindented else *is* a syntax error so it fails much sooner and prevents the compiler to complain about the break. This means that in the presence of two syntax errors, one being a parser error and the other a compiler error, the parser will always be first, no matter if the other one appears before in the code. Given this, I am afraid we need to close this issue as "won't fix" :( Bing said that, if someone devises some easy way to do this without major changes everywhere, I am happy to reopen it ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46910> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com