Hacker News new | past | comments | ask | show | jobs | submit login

A quick comparison of some Python implementations I found via quick Googling:

https://gist.github.com/andybak/45e3155420d18420a34a




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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: