[Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes? (original) (raw)

Serhiy Storchaka storchaka at gmail.com
Mon Feb 23 10:57:42 CET 2015


See topic "Unrecognized backslash escapes in string literals" in Python list [1]. I agree that this is a problem, especially for novices (but even experience users can make a typo). May be emit SyntaxWarning on unrecognized backslash escapes? An exception is already raised on invalid octal or hexadecimal escapes. '\x' is syntax error, not two characters '\' and 'x'.

[1] http://comments.gmane.org/gmane.comp.python.general/772455



More information about the Python-Dev mailing list