From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QIWhDJja/F5bbwAA0tVLHw (envelope-from ) for ; Wed, 01 Jul 2020 18:48:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IKt8CJja/F44JQAA1q6Kng (envelope-from ) for ; Wed, 01 Jul 2020 18:48:56 +0000 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 95F149404E2 for ; Wed, 1 Jul 2020 18:48:55 +0000 (UTC) Received: from localhost ([::1]:39510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqhmu-0007N0-E6 for larch@yhetil.org; Wed, 01 Jul 2020 14:48:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqhmW-0007Mu-2w for emacs-orgmode@gnu.org; Wed, 01 Jul 2020 14:48:28 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:38211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqhmU-0007ti-97 for emacs-orgmode@gnu.org; Wed, 01 Jul 2020 14:48:27 -0400 Received: from [192.168.178.39] ([82.207.239.105]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1McIYO-1jE4B0302e-00cjic for ; Wed, 01 Jul 2020 20:48:22 +0200 Subject: Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)] To: emacs-orgmode@gnu.org References: <294a8a24-c899-7fc5-5c3d-03fe7b487292@crabman.me> From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Message-ID: <9cce4a8a-d151-871a-9f42-ee21a2cd19dc@easy-emacs.de> Date: Wed, 1 Jul 2020 20:48:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <294a8a24-c899-7fc5-5c3d-03fe7b487292@crabman.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Provags-ID: V03:K1:uZetRzSlCDQ/k3/EdLdpAIxCWiU0Z65Znj/mzbZs/sG9GEkebFi jxhq9EIzkkmGUhsImTda3NtAA7sLxqmB69KfnDOq6ZO7XxGg4jgRVcb1oqCwyJfilDPbGe8 J7pvJNGAxly92yTh9jUlcDXR35E3nlrTqE3DP8KLHN2x65ZhsNTjrm/IE0BBfAOOw6uo6E7 qLcmaDqsUEbijIw4TF0uA== X-UI-Out-Filterresults: notjunk:1;V03:K0:mu4OPyteWaI=:yXXBL1+82GSlDMdqf/n4pD yV77goAU0OoUYoUO5hxX6IrGukYxHOu0dk/RXheU2hx8kt1+kgkvny3Kv0TcW5dnYJy9tzvw+ XEfWbHdqVwCTZzhmN9OdqUe+FB/rvoexkA1qPwGMpthXz+x9HMomCYsMswnE47wzq4zlQvfxZ LGOt38c5GqixVta1HC6yFzxSckvfIB8AphvtZmpufK3lulmJY+HlRq+eHW14hQgkXHzTr7Qcj lrjmaVWCCuqvsTrBMkUn6k+fF0N1VerXUOG8S40w4n7MCiDI5KV/P0NJD8SAFCIFcGasLFUiz WdJeqbJgJABb7kF639LiVFAnMJISTOxRsk4UwQouoLzTlquOclMlOZVRvj/8AW5Hi/I/WPJyI ++ycj8PJkyjQec4fqsBR0dKNB2giks1CZKKzcHcKQmd8rGcf/X66otic/VSqC0iwY1swdRfGJ XSFQcxi5HM3K0ZnkpGGMVJnq2h0h5MMPWoWzXieYHLsw53Gdlitwakbzy6bH0e8NpfAnGA+Da f6QXOJMdpmMNGWQk5Mw9D+JCKCAs08/EXy5sl2UWZ0ur3HUB7O+vs5r1CsFR7Cg9VyGMUHz1s zqxbGXaMZOC4wpYbnA4dIYJT+/Rx8Gji6F+qmF+JByv0ST1EAUl9DEtljEE6lYHx7kSENTsJG uTHGIKesDmCHSium9RduCJahsszsVekvAUJfZeCnanDa3DH8aSSMgdd+//+HQNfuJLqOAeDTe ePa3LO6jzXnta2JV5f5tmdKFVN9PWtReUdILHJSdNOd4QelWRZgRaZC8kYXwovHRhwMxOow1d uGhr8L0WtV6qo9e6vjn7UsGG3DFWJEhKrt6xfzFl37WcqPxbmEJalZqKOibPz4nM2+kh2Ij Received-SPF: none client-ip=212.227.126.131; envelope-from=andreas.roehler@easy-emacs.de; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/01 14:48:23 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: Y0dCgcEhhQBq On 01.07.20 18:55, Philip Blagoveschensky wrote: > #+begin_src python :session bug_report > def foobar(): >     for i in range(5): >         pass >     print "hello world" > > foobar() > #+end_src Works here like this: #+begin_src python :results output def foobar():     for i in range(5):         pass     print("hello world") foobar() #+end_src #+RESULTS: : hello world GNU Emacs 28.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 3.14.5, cairo version 1.14.0) of 2020-06-10