Unrecognized escape sequences in string literals
Steven D'Aprano
steven at REMOVE.THIS.cybersource.com.au
Wed Aug 12 03:08:06 EDT 2009
On Tue, 11 Aug 2009 14:48:24 -0700, Douglas Alan wrote:
> In any case, my argument has consistently been that Python should have
> treated undefined escape sequences consistently as fatal errors,
A reasonable position to take. I disagree with it, but it is certainly
reasonable.
> not as warnings.
I don't know what language you're talking about here, because non-special
escape sequences in Python aren't either errors or warnings:
>>> print "ab\cd"
ab\cd
No warning is made, because it's not considered an error that requires a
warning. This matches the behaviour of other languages, including C and
bash.
--
Steven
More information about the Python-list
mailing list