On Wed, Apr 6, 2022 at 7:05 PM Mike Miller
On 2022-04-06 12:36, Paul Moore wrote:
And if new syntax is a clear win even with such a library, then designing a language feature that enables better syntax for that library would still be possible (and there would be a clear use case for it, making the arguments easier to make).
If folks are really hung up on the syntax limits, there is shortcut to prototype new syntax using the codecs module to edit code on the fly. It's a cheat, but probably less work than writing a transpiler/dsl.
Don't remember who invented the technique, but the last project I tried was to support f-strings under Python of pre-3.6 vintage, called future-fstrings:
There is also my ideas module https://aroberge.github.io/ideas/docs/html/ which I created to facilitate this type of exploration. In fact, I made a note just two days ago about doing this myself https://github.com/aroberge/ideas/issues/16 André
Should be enough there to show how it's done.
Why not try this technique, combine with one of the libraries, and start writing some code? If it works well enough and enough folks are interested, the proposal would all the evidence it needs, imho.
-Mike
_______________________________________________ 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/MKZW5U... Code of Conduct: http://python.org/psf/codeofconduct/