macropy
macropy copied to clipboard
Macros in Python: quasiquotes, case classes, LINQ and more!
On some occasions, a macro needs to invoke another: ```python @macros.expr def aif(tree, gen_sym, **kw): # no hq[], the whole point of "aif" is to leak "it". bindings = [q[(it,...
These expand differently: ```python from macropy.core import macros, show_expanded from unpythonic.syntax import macros, curry with curry, show_expanded: def add3(a, b, c): return a + b + c assert add3(1)(2)(3) ==...
The documentation and docstrings of `Walker` need updating: - `ctx` is passed by name, not positionally. - `ctx` is just an arbitrary user-defined name; it has no special meaning. This...
Things that came up in a discussion with @azazel75 that could be added to the docs: 1. A block macro gets as its argument, and is expected to return, a...
Block macros name their argument `tree`, although technically what gets passed in is a forest (as a list of trees). It would be more descriptive, if the argument name somehow...
pytest is a much better testing framework than unittest. We need to migrate our tests to that framework so that we can test, benchmark etc.