On Fri, Jul 24, 2020 at 10:43 PM Chris Angelico <rosuav@gmail.com> wrote:
SNIP 

> If we had some sort of easy to use standard library support for
> transpiling code, then your advice could actually be practical and not
> just dismissive. "Pft, if you don't like it, write your own language" is
> not exactly practical for most people. Even if a transpiler is a tad
> simpler than writing an entire interpreter or compiler, it's still a new
> language.

... would be best done with stdlib support, yes. I think import hooks
can do everything that's needed, but I've never actually done it.
Normally I'd just use a simple source-to-source transformation before
execution, and usually I do things that aren't ever going to show up
(string literals aside), so I don't need it to be very smart.

Already done (with a different keyword):

https://aroberge.github.io/ideas/docs/html/nobreak.html 

André Roberge


ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/TZ7XW73YHYSIYTNT3NA4PBCNNBWELFHL/
Code of Conduct: http://python.org/psf/codeofconduct/