[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: If else blocks inside for loop fail in newest version [9.1.
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Bug: If else blocks inside for loop fail in newest version [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/paul/org-mode/lisp/)] |
Date: |
Thu, 20 Dec 2018 14:39:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello,
Paul Lodder <address@hidden> writes:
> If else blocks inside for loops in python cause IndentationError, it
> does accept the 'if' and the indented part below the 'if', but from
> 'else:' onwards the code is not evaluated anymore because of the
> 'unexpected indent'. I added an example code block in which this error
> occurs. The list 'odds' only contained even values.
>
> I fixed it by downgrading to an older release again.
>
> #+BEGIN_SRC python
> even = []
> for i in range(10):
> if i % 2 == 0:
> even.append(i)
> else:
> print("here")
> even.append(("this should be in the list as well",))
>
> even
> #+END_SRC
FWIW, I cannot reproduce your issue on master branch.
Regards,
--
Nicolas Goaziou