emacs-orgmode
[Top][All Lists]
Advanced

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

Org Babel says 1 + 1 in Python is None


From: Rudolf Adamkovič
Subject: Org Babel says 1 + 1 in Python is None
Date: Fri, 06 Sep 2024 15:33:32 +0200

Today, I decided to start using Python in Org.

(1) I read in "WORG":

  :results {output, value}: [...] Value results are the value of the
  last expression evaluated in the code block. Value mode is the default
  (as with other languages).

(2) So, I try it, and get:

  src_python{1 + 1} {{{results(=None=)}}}

I expected this to be 2.

Questions:

- Who is correct: (1) the documentation or (2) the implementation?
- If (2) is correct, do I have to write `return' every time?

Rudy
-- 
"Mathematics takes us still further from what is human into the region
of absolute necessity, to which not only the actual world, but every
possible world, must conform."  --- Bertrand Russell, 1902

Rudolf Adamkovič <rudolf@adamkovic.org> [he/him]
http://adamkovic.org



reply via email to

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