How to get the value out of Hy function? #2458
-
I would like to evaluate functions defined in Hy inside Python code and get the return values given the argument values. For example:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Edit for future readers: you need Did you look at the docstring of |
Beta Was this translation helpful? Give feedback.
-
I know none. Any recommendations? I've spent at least an hour searching for Lisp S-expressions evaluation in Python with very muddy results. |
Beta Was this translation helpful? Give feedback.
Edit for future readers: you need
hy.read_many
to read multiple forms in a single string at one go.hy.read
reads only the first form.Did you look at the docstring of
hy.read
?