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:
https://github.com/asottile-archive/future-fstrings
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-le...@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/MKZW5UORORGDSP7EVEDM2HCYOET4RY4J/
Code of Conduct: http://python.org/psf/codeofconduct/