What about:<br><br>csstext += '{nl}{key}{space}{nl}'.format()<br><br>Format called with no arguments could default to reading from the locals dict.<br><div class="gmail_quote"><div dir="ltr">On Mon, 20 Jul 2015 at 9:22 am Terry Reedy <<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7/19/2015 7:12 PM, Mike Miller wrote:<br>
> Have long wished python could format strings easily like bash or perl<br>
> do, ...<br>
> and then it hit me:<br>
><br>
>      csstext += f'{nl}{selector}{space}{{{nl}'<br>
<br>
Are the unbalanced braces here and in the followup intentional?<br>
<br>
<br>
--<br>
Terry Jan Reedy<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>