Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just to expand on your comment. One can write the equivalent code for a for in python[0] but one can't make python rewrite itself.

[0]: https://gist.github.com/PuercoPop/9d192f94f88074d06625



cough I'd love to say it's possible, but with a few modifications.

https://github.com/hylang/hy

http://docs.hylang.org/en/latest/language/api.html?highlight...


It is possible with macropy as well. But both hylang and macropy depend on the load module hook to run the transformation iirc. So the transformation don't work the the __main__ module.




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

Search: