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

The typical way to do that is to reuse the interpreter infrastructure. This hack could be done with the ast:

https://docs.python.org/3.5/library/ast.html#ast.NodeTransfo...



AST is cool, but you have to comply with Python's syntax.

the coding way you can invent any wild syntax.


I guess my first approach to that would not involve overloading the import statement.




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

Search: