Guido van Rossum writes:
> I don't know about the line breaks, but in recent weeks I've found myself
> more than once having to remind myself that inside interpolations, you must
> use the other type of quote.
My earlier remarks were specifically directed to line breaks.
I see the point, but I think the question should be readability, as
David points out. I don't think there's a problem with the opening
quote in your example. Even in an ordinary string literal it's
obvious to me that the embedded quotation marks are not intended to
terminate the string:
s = "Here is a singleton " and here is an initial for "something."
But how about that last quotation mark? I tried to construct a
similarly visually ambiguous f-string where braces "hide" the embedded
quotation marks, and couldn't do it without a trailing quote followed
immediately by an embedded literal line break.
So I'm cautiously sympathetic to this extension, as long as embedded
line breaks are not permitted in singly-quoted f-strings.
However, I myself will almost certainly automatically "correct" such
quotation marks if they are allowed. So this is unlikely to be a plus
or a minus for me.
Steve
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/ZILJFTV6UXO63F76PSY6VCPNGTLMYIMR/
Code of Conduct: http://python.org/psf/codeofconduct/