This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients Jim Fasarakis-Hilliard, eric.smith
Date 2016-12-29.12:45:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm not sure this counts as an error. The backslash means to treat the next character literally, which this does. And since \{ is not a valid escape sequence, it keeps both characters, exactly like:

>>> '\c'

Furthermore, since unknown escape sequences are deprecated, this usage is going to be an error in the future. You can see this now with -Werror:

$ python.exe  -Werror
Python 3.6.0b1+ (3.6:87de1f12c41c+, Sep 16 2016, 07:05:57) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> f'\{10}'
DeprecationWarning: invalid escape sequence '\{'
>>> '\c'
DeprecationWarning: invalid escape sequence '\c'

Since this works as I expect it to now, and since it will become an error in the future, I don't think any change is warranted.
Date User Action Args
2016-12-29 12:45:48eric.smithsetrecipients: + eric.smith, Jim Fasarakis-Hilliard
2016-12-29 12:45:48eric.smithsetmessageid: <>
2016-12-29 12:45:48eric.smithlinkissue29104 messages
2016-12-29 12:45:47eric.smithcreate