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 asmeurer
Recipients Eric Wieser, abarry, asmeurer, mark.dickinson, ncoghlan, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy
Date 2019-07-23.23:40:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Well paradoxically, the bugs that this prevents are the ones it doesn't warn about. If someone writes '\tan(x)' thinking it is a string representing a LaTeX formula for the tangent of x, they won't realize that they actually created a string with a tab plus "an(x)". So actually I would argue that the end goal *is* to make people aware of which escape characters exist, or at the very least, always make strings raw if there's even the remotest chance they will contain a backslash character. 

Is it the best way to go about this? I don't know. The whole thing sort of makes me think raw strings should have been the default, but it's obviously too late to change that. 

I personally don't feel strongly about the warnings being enabled by default or not. My big gripe is that if you actually want the warnings they are difficult to get in a reproducible way. I'm actually surprised they are so annoying for you. Once a py file is compiled into a pyc file the warnings completely disappear, even if you want them!

The fact that you can't use a real escape sequence in a raw string is annoying but not the end of the world given that it's trivial to concatenate strings.
Date User Action Args
2019-07-23 23:40:53asmeurersetrecipients: + asmeurer, rhettinger, terry.reedy, mark.dickinson, ncoghlan, r.david.murray, serhiy.storchaka, abarry, Eric Wieser
2019-07-23 23:40:53asmeurersetmessageid: <>
2019-07-23 23:40:53asmeurerlinkissue32912 messages
2019-07-23 23:40:53asmeurercreate