[Python-Dev] PEP-498: Literal String Formatting
python-ideas at mgmiller.net
Mon Aug 10 22:12:21 CEST 2015
Here are my notes on PEP 498.
1. Title: Literal String Formatting
- String Literal Formatting
- Format String Expressions
2. Let's call them "format strings" not "f-strings".
The latter sounds slightly obnoxious, and also inconsistent with the
r'' raw string
u'' unicode object (string)
f'' format string
3. " This PEP does not propose to remove or deprecate any of the existing
string formatting mechanisms. "
Should we put this farther up with the section talking about them,
it seems out of place where it is.
4. "The existing ways of formatting are either error prone, inflexible, or
I would tone this down a bit, they're not so bad, quite verbose is a
phrase I might use instead.
5. Discussion Section
How to designate f-strings, and how specify the locaton of expressions
6. Perhaps mention string literal functionality, like triple quotes, line-ending
backslashes, as MRAB mentions, in addition to the concatenation rules.
On 08/07/2015 06:39 PM, Eric V. Smith wrote:
More information about the Python-Dev