Nice, that's a clever use of decorators. A bit annoying that you need repeated "defs", though.
Here's another approach based on Macropy (basically, macros for Python): https://github.com/lihaoyi/macropy#pattern-matching.
Here's another approach based on Macropy (basically, macros for Python): https://github.com/lihaoyi/macropy#pattern-matching.
No comments yet.