[Python-ideas] Briefer string format
Guido van Rossum
guido at python.org
Mon Jul 20 19:25:51 CEST 2015
Perhaps surprisingly, I find myself leaning in favor of the f'...{var}...'
form. It is explicit in the variable name.
Historically, the `x` notation as an alias for repr(x) was meant to play
this role -- you'd write '...' + `var` + '...', but it wasn't brief enough,
and the `` are hard to see. f'...' is more explicit, and can be combined
with r'...' and b'...' (or both) as needed.
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150720/5bf9c4a1/attachment.html>
More information about the Python-ideas
mailing list