Author jitterman
Recipients crwilcox, eric.smith, jitterman, zach.ware
Date 2020-02-11.21:56:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I believe it is worth fixing as it clears up some rather glaring inconsistenciesā£
and enables a useful capability. Specifically,

1. Formatted string literals and the string format method are currently 
   inconsistent in the way that they handle double braces in the format 

    >>> x = 42
    >>> import datetime
    >>> now =

    >>> f'{now:x{{x}}x}'

    >>> '{:x{{x}}x}'.format(now)

2. Formatted string literals currently seem inconsistent in the way they handle 
   handle doubled braces.

   In the base string doubling the braces escapes them.

    >>> f'x{{x}}x'

   In the replacement expression doubling the braces escapes them.
    >>> f'{f"x{{x}}x"}'

   In the format specifier doubling the braces does not escape them.
    >>> f'{now:x{{x}}x}'

3. Currently there is no way I know of escape the braces in the format 

4. Allowing the braces to be escaped in the format specifier allows the user to 
   defer the interpretation of the of a format specifier so that it is evaluated 
   by a format function inside the object rather than being evaluated in the 
   current context.  That seems like a generally useful feature.
Date User Action Args
2020-02-11 21:56:56jittermansetrecipients: + jitterman, eric.smith, zach.ware, crwilcox
2020-02-11 21:56:56jittermansetmessageid: <>
2020-02-11 21:56:56jittermanlinkissue39601 messages
2020-02-11 21:56:56jittermancreate