3 ms·
Yup that's the point of my submission, too bad HN edited my title so it looks like a boring trick. It allows you to transform your code without significant spee
by est 12y ago
Yup that's the point of my submission, too bad HN edited my title so it looks like a boring trick. It allows you to transform your code without significant speed loss.
Think of possibilities like
# coding: JIT
or
# coding: inline-C
etc.
- maxerickson 12y agoThe 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.NodeTransformer https://docs.python.org/3.5/library/ast.html#ast.NodeTransfo...
- est 12y agoAST is cool, but you have to comply with Python's syntax. the coding way you can invent any wild syntax.
- maxerickson 12y agoI guess my first approach to that would not involve overloading the import statement.