A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-September/141475.html below:

[Python-Dev] PEP 498: Literal String Interpolation is ready for pronouncement

[Python-Dev] PEP 498: Literal String Interpolation is ready for pronouncement [Python-Dev] PEP 498: Literal String Interpolation is ready for pronouncementEric V. Smith eric at trueblade.com
Sat Sep 5 22:43:52 CEST 2015
On 9/5/2015 12:18 PM, Guido van Rossum wrote:
> On Sat, Sep 5, 2015 at 2:10 AM, haypo s <victor.stinner at gmail.com
> <mailto:victor.stinner at gmail.com>> wrote:
>
>     (is it possible to indent and comment code inside a f-string?)
> 
> 
> Now that's an interesting question. I think the answer must be No,
> because we don't want to deal with ambiguities like whether a closing
> curly bracket or string quote should be ignored inside such comments.
> The processing of f-strings described by the PEP uses several phases:

I'll update the PEP to say comments aren't allowed. It gets especially
wacky when adding () around the expression: f'{2#}' would become the
expression "(2#)", which is a syntax error.

Eric.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4