
That is no better than: str.format(**locals(), **globals()) On Sun, Jul 19, 2015 at 8:00 PM, Sam O'Malley <omalsa04@gmail.com> wrote:
What about:
csstext += '{nl}{key}{space}{nl}'.format()
Format called with no arguments could default to reading from the locals dict. On Mon, 20 Jul 2015 at 9:22 am Terry Reedy <tjreedy@udel.edu> wrote:
On 7/19/2015 7:12 PM, Mike Miller wrote:
Have long wished python could format strings easily like bash or perl do, ... and then it hit me:
csstext += f'{nl}{selector}{space}{{{nl}'
Are the unbalanced braces here and in the followup intentional?
-- Terry Jan Reedy
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/