PEP 501 is unlikely to be accepted *as is*. But it’s still a good starting point. Personally I would look for inspiration towards JavaScript template literals ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_l...), combined with f-string-like interpolation. On Fri, Jun 4, 2021 at 07:24 Matt del Valle <matthewgdv@gmail.com> wrote:
Interpolation templates were recently brought up here ( https://mail.python.org/archives/list/python-ideas@python.org/thread/5AW73IC...), and Guido mentioned that in his opinion the SC would be unlikely to reconsider PEP 501 in its current state. I trust that he has a much better insight into this sort of thing than the rest of us, so he's likely right, but if I'm honest I wasn't able to find any of the actual reasons why PEP 501 was deferred in the Rationale or Discussion sections of the PEP.
If anyone has any insight into the actual reasons why PEP 501 might be considered unworkable in its current state, I'd be really curious to find out what they are. It's hard to argue in favor of a feature if you don't know what the actual arguments against it are.
The rationale for it at least seems quite solid to me, as it provides powerful templating and injection-safety functionality. It's not a purely hypothetical feature either, as it has been quite successful in other languages like C#.
If the success of f-strings over the last five years is anything to go by, people also seem to overwhelmingly prefer this style of string formatting compared to `str.format` or `%` formatting. I literally can't think of a single modern Python codebase I've seen lately where f-strings weren't the main method of string-formatting employed.
Is it something in the implementation then? Or something else?
On Fri, Jun 4, 2021 at 1:37 PM Chris Angelico <rosuav@gmail.com> wrote:
On Fri, Jun 4, 2021 at 10:02 PM Thomas Güttler <info@thomas-guettler.de> wrote:
Hi,
I have a crazy idea how to extend Python for web development.
What do you think? What are the next steps?
[chomp details]
Something like this - but more generic - has been proposed already:
https://www.python.org/dev/peps/pep-0501/
There've been a few variants on the idea, but I think PEP 501 is the best summary.
If you want to press forward with this, I think that would be the best starting point.
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/WZHFKM... Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ 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/PWZALQ... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido (mobile)