3 ms·
Yup. You can basically write your own language with different syntax and get python to treat it like any other python code. Hy is a language which works this wa
by rcxdude 7y ago
Yup. You can basically write your own language with different syntax and get python to treat it like any other python code. Hy is a language which works this way: https://github.com/hylang/hy https://github.com/hylang/hy (see this part of their documentation for how the user can use this: https://docs.hylang.org/en/master/language/interop.html#using-hy-from-python https://docs.hylang.org/en/master/language/interop.html#usin...)
I think goto has been implemented in a few different ways in python. Here's another example which abuses existing syntax and edits the bytecode of the function after its compiled: https://pypi.org/project/goto-statement/ https://pypi.org/project/goto-statement/