Jack Kamm <jackk...@gmail.com> writes:

>>> So I think WORG needs to be fixed.
>>>
>>> Can you send a patch?
>>> https://git.sr.ht/~bzg/worg
>>
>> Yes, patch would be welcome.
>
> As Sebastian mentioned, Worg already documents the behavior, under the
> section "Return values":
>
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html#org6eb75c6

Right.
Then, I see nothing else that can be done on Org side.

I'm afraid that trying to replicate Python REPL behavior for
non-interactive src blocks will be beyond what we can reasonably do in
Org: we would somehow need to detect the last statement in the src
blocks, which may or may not span a single line; and multiline statements
will need to use some kind of Python parser. All this sounds way too
fragile to be practical.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to