emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Paul Lodder <paul_lodder@live.nl>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: 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	[thread overview]
Message-ID: <87r2ecxqpp.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <AM6P194MB02611261A78F6970BEA7667C83BE0@AM6P194MB0261.EURP194.PROD.OUTLOOK.COM> (Paul Lodder's message of "Wed, 19 Dec 2018 10:21:30 +0000")

Hello,

Paul Lodder <paul_lodder@live.nl> 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

      reply	other threads:[~2018-12-20 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 10:21 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/)] Paul Lodder
2018-12-20 13:39 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r2ecxqpp.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=paul_lodder@live.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).