emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Python Code Block error with header option :results output


From: Eric Schulte
Subject: Re: [O] Python Code Block error with header option :results output
Date: Fri, 31 Jan 2014 14:33:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Soapy Smith <address@hidden> 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 "<stdin>", 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]