emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Python source block weirdness #2


From: Brad Knotwell
Subject: [O] Python source block weirdness #2
Date: Sat, 30 Mar 2019 19:52:19 +0000 (UTC)

Good day all--

I've a similar problem that might hint at what's occurring.  You can't use an else or elif block in a python src block (might be session-specific).  Looking through the commits, I wonder if
    1966d58b253d0077025589c736b9223010682e17

Had some unintended consequences.

Thx.

--Brad

#+NAME: works
#+begin_src python :session broken :exports both
s = True

if s == False:
    'result = %d' % 3

if s == True:
    'result = %d' % 4
#+end_src

#+RESULTS: works

Will it work again?

#_NAME: sadness
#+begin_src python :session broken2 :exports both
s = True

if s == False:
    'result = %d' % 3
else:
    'result = %d' % 4
#+end_src

It shouldn't be empty:
#+RESULTS: sadness

Output follows:

,----
| s = True
| if s == False:
|     'result = %d' % 3
| if s == True:
|     'result = %d' % 4
`----

,----
| result = 4
`----


Will it work again?

#_NAME: sadness
,----
| s = True
| if s == False:
|     'result = %d' % 3
| else:
|     'result = %d' % 4
`----

It shouldn't be empty:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]