Simplifying python results code.

Move org-babel-python-table-or-results into the :results value branch
of org-babel-python-evaluate, and get rid of default case (result-type
must always be either output or value). I wonder if the org-babel-trim
s are necessary: they don't seem to be needed in the code for ruby.
This commit is contained in:
Dan Davison 2009-07-05 19:16:08 -04:00
parent f4eaee5b46
commit 93a964d236
1 changed files with 3 additions and 4 deletions

View File

@ -168,10 +168,9 @@ last statement in BODY."
(cdr (member org-babel-python-eoe-indicator
(reverse (mapcar #'org-babel-trim raw)))))))
(setq results (mapcar #'org-babel-python-read-string results))
(org-babel-trim (case result-type
(output (mapconcat #'identity (reverse (cdr results)) "\n"))
(value (car results))
(t (reverse results))))))))
(case result-type
(output (org-babel-trim (mapconcat #'identity (reverse (cdr results)) "\n")))
(value (org-babel-python-table-or-results (org-babel-trim (car results)))))))))
(defun org-babel-python-read-string (string)
"Strip 's from around ruby string"