emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Scott May <bscottmay@yahoo.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [babel] Possible bug: (mis)handling tuples for :return value in Python [7.4 (release_7.4.153.ga0b8)]
Date: Sun, 27 Feb 2011 14:30:15 -0700	[thread overview]
Message-ID: <87pqqd88t4.fsf@gmail.com> (raw)
In-Reply-To: <359245.93455.qm@web65609.mail.ac4.yahoo.com> (Scott May's message of "Thu, 24 Feb 2011 06:22:46 -0800 (PST)")

Scott May <bscottmay@yahoo.com> writes:

> I do not think that =org-babel-read= is correctly handling Python
> tuples that are returned from source blocks.
>
> If I execute the following source block:
> #+begin_src python :results value
>   return (1,2)
> #+end_src
>
> I get the following error message:
> : Symbol's function definition is void: 1\,
>
> The Python output for this source block is =(1,2)=, which =org-babel-read=
> interprets as lisp and tries to eval.
>
> I can work around the problem using either a Python list:
> #+begin_src python :results value
>   return [1,2]
> #+end_src
>
> or by using =:results output=
> #+begin_src python :results output :session
>   (1,2)
> #+end_src
>
> Regards,
> Scott
>

Hi Scott,

This issue has come up a couple of times recently.  I just pushed up a
fix.  Please let me know if you run into any further issues.

Thanks -- Eric

  reply	other threads:[~2011-02-27 21:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 14:22 [babel] Possible bug: (mis)handling tuples for :return value in Python [7.4 (release_7.4.153.ga0b8)] Scott May
2011-02-27 21:30 ` Eric Schulte [this message]
2011-02-28 13:22   ` Scott May

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqqd88t4.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=bscottmay@yahoo.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).