Closed cloojure closed 3 years ago
What is the expected behavior here? Sounds like you're expecting a :result
key?
Ah, I see. The documentation says there should be a :result
. This is no longer the case, we'll update the docstring.
If you're looking for a result, you need to use the interop directly. As an example:
(require '[libpython-clj.requre :refer [require-python import-python]])
(require-python 'operator)
;;=> :ok
(operator/add 2 3)
;;=> 5
@cloojure if you're encountering any issues with getting started, please feel free to stop by the Zulip chat (https://clojurians.zulipchat.com/#narrow/stream/215609-libpython-clj-dev) or continue to message here!
OK, cool. Thanks for the tip about operator/add
I was wondering how to
do that!
Alan
On Mon, Oct 19, 2020 at 5:29 PM J.J. Tolton notifications@github.com wrote:
Ah, I see. The documentation says there should be a :result. This is no longer the case, we'll update the docstring.
If you're looking for a result, you need to use the interop directly. As an example:
(require '[libpython-clj.requre :refer [require-python import-python]]) (require-python 'operator);;=> :ok (operator/add 2 3) ;;=> 5
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clj-python/libpython-clj/issues/129#issuecomment-712514793, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWBOB5LSINKZOEW6ABLRHTSLTKVFANCNFSM4SXBXSRA .
I couldn't figure out how to get the last result left on the stack. I really would like it to just return the result that was left on the stack but regardless the documentation was incorrect (fixed now, thank to JTolton). Thanks for bringing this up!
Tried a test: