[Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?
Chris Angelico
rosuav at gmail.com
Wed Feb 25 07:03:18 CET 2015
On Wed, Feb 25, 2015 at 5:00 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> There is a wider context here, too: semantics of the backslash escape
> <URL:https://en.wikipedia.org/wiki/Backslash#Usage> commonly include
> “backslash followed by a character not otherwise mentioned will produce
> that character, verbatim”.
>
> Proposals to change that for Python's string literals must account for
> the fact this will make Python's rules for backslash escape surprisingly
> different in this regard from many other usages of backslash escape.
That's different from Python's rule, which is that "backslash followed
by a character not otherwise mentioned will produce *a backslash
followed by* that character, verbatim".
ChrisA
More information about the Python-Dev
mailing list