Jonas Bernoulli <jo...@bernoul.li> writes: > `org-babel-script-escape' doesn't handle an empty python list > correctly; ['a'] => ("a") but [] => []. > > #+name: addheader > #+header: :var rows="" > #+begin_src python > return [] > #+end_src > > #+header: :post addheader(*this*) > #+begin_src emacs-lisp :results table > nil > #+end_src > #+RESULTS: > : [] > > An empty python list is turned into an empty lisp vector instead of > an empty lisp list. At least for python, (> (length str) 2) should > probably be changed to use >=.
Thanks a lot! A reproducer helps a ton. Fixed on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4c0641837c8570dd8ad7f18c2482411bdc0cda16 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>