Jack Kamm <jackk...@gmail.com> writes: > I attach a 2nd patch implementing this. It also makes ":results table" > the default return type for dict. (Use ":results verbatim" to get the > dict as a string instead).
Thanks! >> #+begin_src python :results list >> return {"a": 1, "b": 2} >> #+end_src >> >> #+RESULTS: >> - a :: 1 >> - b :: 2 > > This seems harder, and may require more widespread changes beyond > ob-python. In particular, I think we'd need to change > `org-babel-insert-result' so that it can call `org-list-to-org' with a > list of type "descriptive" instead of "unordered" here: > > https://git.sr.ht/~bzg/org-mode/tree/cc435cba71a99ee7b12676be3b6e1211a9cb7285/item/lisp/ob-core.el#L2535 Actually, (org-list-to-org '(unordered ("a :: b") ("c :: d"))) will just work. We do not support nested lists when transforming output anyway. So, unordered/descriptive does not matter in practice. -- 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>