<div dir="ltr">I've followed all the posts in this thread, and although my particular opinion has little significance, I'm definitely -1 on this idea (or actually -1000).<div><br></div><div>To my mind is that we have already gone vastly too far in proliferating near synonyms for templating strings. Right now, I can type:</div><div><br></div><div>>>> "My name is %(first)s %(last)s" % (**locals())<br></div><div><br></div><div>Or:</div><div><br></div><div>>>> "My name is {first} {last}".format(**locals())</div><div><br></div><div>Or:</div><div><br></div><div>>>> string.Template("My name is $first $last").substitute(**locals())</div><div><br></div><div>And they all mean the same thing, with pretty much the same capabilities. I REALLY don't want a 4th or 5th way to spell the same thing... let alone one with weird semantics with lots of edge cases that are almost impossible to teach.</div><div><br></div><div>I really DO NOT want to spell the same thing as f"..." or !"...", let alone have every single string magically become a runtime evaluated complex object like "My name is \{first}".</div><div><br></div><div>Yes, I know the oddball edge cases each style supports are slightly different... but that's exactly the problem. It's yet another thing to address an ever-so-slightly different case, where the actual differences are impossible to explain to students; and where there's frankly nothing you can't do with just a couple extra characters using str.format() right now.</div><div><br></div><div>Yours, David...</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 19, 2015 at 4:12 PM, Mike Miller <span dir="ltr"><<a href="mailto:python-ideas@mgmiller.net" target="_blank">python-ideas@mgmiller.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have long wished python could format strings easily like bash or perl do, ...<br>
and then it hit me:<br>
<br>
csstext += f'{nl}{selector}{space}{{{nl}'<br>
<br>
(This script included whitespace vars to provide a minification option.)<br>
<br>
I've seen others make similar suggestions, but to my knowledge they didn't<br>
include this pleasing brevity aspect.<br>
<br>
-Mike<br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Keeping medicines from the bloodstreams of the sick; food <br>from the bellies of the hungry; books from the hands of the <br>uneducated; technology from the underdeveloped; and putting <br>advocates of freedom in prisons. Intellectual property is<br>to the 21st century what the slave trade was to the 16th.<br></div>
</div>