Eric V. Smith writes:
> >> But this does not:
> >>
> >> f'{1 +
> >> 2}'
> >
> > The later is an error with or without the 'f' prefix and I think that
> > this should continue to be the case.
> >
> The thought is that anything that's within braces {} and is a valid
> expression should be allowed.
-0 FWIW, some thoughts specific to me, I don't know how
representative they might be of others.
I guess you could argue that the braces are a kind of expression-level
parenthesis, but I don't "see" them that way. I see *one* string with
eval'able format expressions embedded in it, so that single-quoted
strings can't have embedded newlines. I also don't see the braces as
expression-level syntax (after all, they already have two different
meanings at expression level), I see them as part of f-string syntax.
So even with triple-quoted strings, my eyes "want" to see parentheses
or line continuation (which already work).
I'm sure I could get used to the syntax. But ...
Is this syntax useful? Or is it just a variant of purity trying to
escape Pandora's virtualbox? I mean, am I going to see it often
enough to get used to it? Or am I going to WTF at it for the rest of
my life?
_______________________________________________
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/RPFHA55JDGX522UL2KXIRZKDPIOVDP66/
Code of Conduct: http://python.org/psf/codeofconduct/