Function: org-babel-python-table-or-string
org-babel-python-table-or-string is a byte-compiled function defined
in ob-python.el.gz.
Signature
(org-babel-python-table-or-string RESULTS)
Documentation
Convert RESULTS into an appropriate elisp value.
If the results look like a list or tuple (but not a dict), then convert them into an Emacs-lisp table. Otherwise return the results as a string.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ob-python.el.gz
(defun org-babel-python-table-or-string (results)
"Convert RESULTS into an appropriate elisp value.
If the results look like a list or tuple (but not a dict), then
convert them into an Emacs-lisp table. Otherwise return the
results as a string."
(let ((res (if (and (> (length results) 0)
(string-equal "{" (substring results 0 1)))
results ;don't convert dicts to elisp
(org-babel-script-escape results))))
(if (listp res)
(mapcar (lambda (el) (if (eq el 'None)
org-babel-python-None-to el))
res)
res)))