[Python-Dev] Re: What to do about invalid escape sequences

2019年8月10日 15:49:24 -0700

On 8/10/2019 3:36 PM, Greg Ewing wrote:
Glenn Linderman wrote:
I wonder how many raw strings actually use the \" escape productively? Maybe that should be deprecated too! ? I can't think of a good and necessary use for it, can anyone?
Quite rare, I expect, but it's bound to break someone's code.
It might be better to introduce a new string prefix, e.g.
'v' for 'verbatim':
  v"C:\Users\Fred\"
Which is why I suggested rr"C:\directory\", but allowed as how there might be better spellings.... I like your v for verbatim !
_______________________________________________
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/GTOVRKM7Q4VU67KYDQF6ICU7HAJDSBRX/

Reply via email to