Message284256
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'
'\\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:48 | eric.smith | set | recipients:
+ eric.smith, Jim Fasarakis-Hilliard |
2016-12-29 12:45:48 | eric.smith | set | messageid: <1483015548.13.0.596902268376.issue29104@psf.upfronthosting.co.za> |
2016-12-29 12:45:48 | eric.smith | link | issue29104 messages |
2016-12-29 12:45:47 | eric.smith | create | |
|