From: "Rudolf Adamkovič" <rudolf@adamkovic.org>
To: emacs-orgmode@gnu.org
Subject: Org Babel says 1 + 1 in Python is None
Date: Fri, 06 Sep 2024 15:33:32 +0200 [thread overview]
Message-ID: <m27cboucsz.fsf@adamkovic.org> (raw)
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
next reply other threads:[~2024-09-06 13:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 13:33 Rudolf Adamkovič [this message]
2024-09-07 8:12 ` Org Babel says 1 + 1 in Python is None Dr. Arne Babenhauserheide
2024-10-13 11:41 ` Ihor Radchenko
2024-10-20 7:08 ` Jack Kamm
2024-10-20 9:39 ` Ihor Radchenko
2024-10-21 6:00 ` Jack Kamm
2024-10-21 18:03 ` Ihor Radchenko
2024-10-22 2:43 ` Jack Kamm
2024-10-23 17:13 ` Ihor Radchenko
2024-09-07 9:27 ` Sébastien Gendre
2024-10-28 22:25 ` Rudolf Adamkovič
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=m27cboucsz.fsf@adamkovic.org \
--to=rudolf@adamkovic.org \
--cc=emacs-orgmode@gnu.org \
/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).