Well, I share Rob's concern but I do see the point of this: > Template Literals only make sense if you want to escape values like in HTML, XML or SQL templates.
Maybe they should have a name to better reflect this intended use case? Safe Templates, Escaped Strings, I don't know, I'm terrible at naming things but I do think this would be a nice modification. Best, [image: --] *Felipe* Bidu *(Felipe Rodrigues)* [image: https://]*https://felipevr.com* <https://felipevr.com> On Thu, Jun 10, 2021 at 10:18 AM Thomas Güttler <i...@thomas-guettler.de> wrote: > > > Am Do., 10. Juni 2021 um 14:42 Uhr schrieb Rob Cliffe via Python-ideas < > python-ideas@python.org>: > >> I am concerned that we have too many string formatting methods: >> % formatting >> .format() >> f-strings >> string templates >> (are there others I've missed?). >> And now we have another proposed one. >> It's all getting a bit much. And IMO a turnoff for people learning >> Python (which one should I use, and why?). >> Best wishes >> Rob Cliffe >> > > I can feel with you. There are some new things in Python which make it > harder to learn. I personally > don't see a need for the walrus operator. > > But on the other hand you can't compare Template Literals with normal > string handling. > > This really helps developers to avoid cross-site-scripting attacks by > enabling a secure > escaping of all strings which are not explicitly marked as safe. > > Template Literals only make sense if you want to escape values like in > HTML, XML or SQL templates. > > Regards, > Thomas > > _______________________________________________ > 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/EYO6IZIJXVJZLZ5CVBVZR2PE574Y6Z4G/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ 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/Q5PYOD6RDP2GMIBGXSAVVS4OGZEFPO4X/ Code of Conduct: http://python.org/psf/codeofconduct/