From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AKnBK6HPFGdlfwEA62LTzQ:P1 (envelope-from ) for ; Sun, 20 Oct 2024 09:38:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AKnBK6HPFGdlfwEA62LTzQ (envelope-from ) for ; Sun, 20 Oct 2024 11:38:41 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pO+6gYgb; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729417121; a=rsa-sha256; cv=none; b=n9Xb8zhkh0btaqTMulreixtljWsEqLY0nlSvrFg4pl/3MqV1262M0RzTnXqLHNZhMF5SQR s/y+hKBWvNfzUv600TmLdr8qhCODUVpeEbUHWnjSl48zq1bRPc4TQCsIRGSmPXaSuednWA XWySwRC43QSHjO+xMe2spQks4vj9MPyza4WPXjba8hKwmsFbw7pO5kr8T0Sym0hRDi4iR5 bWqg8bBBGPV7nYJ0/QxHDEI3By+D3dfbuoxeURaN4fRacyGgX5GcTQdXUs9NI1HXtCnqX1 c0yKbHFZYFfE0XTo2S+b6G97PWU7BRLiqo5kD0ButFDkT/SN2DJUDJZbLdkLLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pO+6gYgb; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729417121; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=xRQqZzJwYC/8aCE79FoMGQ5ATe/3qDYCZhMWGGxJI6w=; b=ay1ewwNIi9H9A5erTNazrhJ5vqCgh+54YkdzfOlTW/gSvRH0lDEa0OFC9bWs6FG5hWKJqh qdhZUvWZwlGtr1InDvEwymUvUXK3Cs3e7zorv7SHBJ8725PesK08OKyMFQZnievFNuNROy 8Ctb6bUKVQGhJxYzxXOuDyd1ulmDacbD85kDCFVkeYi0FDoQIoHgyMWs1RHFRv5A5tGOqH 4KGHuwziwqROvS3lwG2jda03HmC62oAZDpH072Pa8RFlGBtldDvy4wMKPwjA3LJAG60kP+ HZGQAzZoxg045dtCzLns9KMCn+W7CxKkO3I4uilbpdfc1tDKQMOYj/BWW3jg+g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 557023F02 for ; Sun, 20 Oct 2024 11:38:41 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2SO4-0004H9-1j; Sun, 20 Oct 2024 05:38:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2SO2-0004Gm-Pe for emacs-orgmode@gnu.org; Sun, 20 Oct 2024 05:38:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2SO0-0007Xr-VZ for emacs-orgmode@gnu.org; Sun, 20 Oct 2024 05:38:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4242E240028 for ; Sun, 20 Oct 2024 11:38:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1729417087; bh=CRVRdD21RHUOxGngUH+7DMVk9zO4A52I+39fEnu7u5w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=pO+6gYgbgcGAAS4ROCYFQoL4oMnsPoW1iPX0OSShXOcDCjASkbmWxdXkNs9DAov44 z8axfGNdgqenwJkkkm8NKDaKzNldIb+zKjGjfYQSCRcXfQFSXgIx6Vg3wrGg9Ldrsl w9OdVYcjQM4HI5herXtMrtGvX1UvmYVP56KIiqxyULac3Kkg7yxbj+dgiT037L9rCu gl27nQhXzmc5EK2hQFbe7i5Yb1Ih+yJ07M4T6qzy8Vl3pgdDb4DClDRY69QxcrXFhy rCYUOyNnfgdwP8YL5rhn6E5dT5ebAlPIUgJBBhndGs2z4DMa8FVl/U6n43t+Fzn/4+ ghRbfqpjG2m6w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XWYJt4y8mz6tsf; Sun, 20 Oct 2024 11:38:06 +0200 (CEST) From: Ihor Radchenko To: Jack Kamm Cc: "Dr. Arne Babenhauserheide" , Rudolf =?utf-8?Q?Adamko?= =?utf-8?Q?vi=C4=8D?= , emacs-orgmode@gnu.org Subject: Re: Org Babel says 1 + 1 in Python is None In-Reply-To: <87bjzf45g5.fsf@gmail.com> References: <87y143x4q0.fsf@web.de> <87plo4z0vi.fsf@localhost> <87bjzf45g5.fsf@gmail.com> Date: Sun, 20 Oct 2024 09:39:54 +0000 Message-ID: <8734krru39.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.18 X-Spam-Score: -1.18 X-Migadu-Queue-Id: 557023F02 X-Migadu-Scanner: mx12.migadu.com X-TUID: t4jh7Bu5vaKC Jack Kamm 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 . Support Org development at , or support my work at