Skip to content
Discussion options

You must be logged in to vote

Why does hy2py print code for the macros and not just the result of their execution ?

In case you want to use macros at runtime, or in another module that requires this one. Consider a program like (defmacro m [] 1) (print (hy.eval '(m))). This can only work in Python if hy2py keeps macro definitions.

Removing macro definitions is the kind of post-hy2py surgery you can do if you want cleaner Python and you know that you don't need the definitions.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@jedesroches
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jedesroches
Comment options

Answer selected by jedesroches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants