From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Python Code Block error with header option :results output Date: Fri, 31 Jan 2014 14:33:53 -0700 Message-ID: <87zjmbu98e.fsf@gmail.com> References: <1391187052.2534.12.camel@raven-CM5571> <1391203457.2534.18.camel@raven-CM5571> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Lkw-0008Mi-G1 for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 16:36:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Lkn-0008KH-BJ for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 16:36:10 -0500 Received: from mail-pb0-x230.google.com ([2607:f8b0:400e:c01::230]:38649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Lkn-0008K7-3z for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 16:36:01 -0500 Received: by mail-pb0-f48.google.com with SMTP id rr13so4886175pbb.7 for ; Fri, 31 Jan 2014 13:36:00 -0800 (PST) In-Reply-To: <1391203457.2534.18.camel@raven-CM5571> (Soapy Smith's message of "Fri, 31 Jan 2014 16:24:17 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Soapy Smith Cc: emacs-orgmode@gnu.org Soapy Smith writes: > Hello- > > I am not a user of Python (yet). During a comparison of code block > behavior between Clojure and Python, I discovered a possible Python > error. > > Here is the code block: > > #+begin_src python :results output > a = (1, 2, 3, 4) > return a > #+end_src > > The evaluation of this block results in this error: > > File "", line 2 > SyntaxError: 'return' outside function > > Could someone please comment if this is expected Python behavior? > You should only use "return" like that in a python code block when you have ":results value". > > I am using org 8.2.4. > > Regards, > Greg > > -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D