Else statement executing when it shouldnt

Chris Angelico rosuav at gmail.com
Tue Jan 22 16:42:27 CET 2013

On Wed, Jan 23, 2013 at 2:39 AM, Thomas Boell <tboell at domain.invalid> wrote:
> Huh?! I would have expected all your examples to raise a SyntaxError or
> IndentationError. Why don't they? Is 'else' not required to have a
> matching 'if'?

Other things can have else, including 'for' and 'while' loops. :)


More information about the Python-list mailing list