Hacker News new | ask | show | jobs
by maxerickson 4092 days ago
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...

1 comments

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.