Comment 2 for bug 328775

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hi,

the first description isn't valid IMHO, as the `for' loop
may contain a `else'-clause, so Emacs can't decide that.

(comparison corrected silently)

if x > 0:
    for i in range(100):
        print i
    else:
        print "All done"

Second example below from thread looks valid for me

if x > 0:
    for i in range(100):
        print i
    elif x < 0:
    print "x is negative"

Wrong indented `elif' is offered, which can't follow `for'.

Opinions?

Andreas