Unrecognized escape sequences in string literals

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Tue Aug 11 20:00:08 CEST 2009

On Tue, 11 Aug 2009 15:50:01 +0200, Piet van Oostrum wrote:

>>>>>> Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> (SD) wrote:
>>SD> If I'm reading this page correctly, Python does behave as C++ does.
>>Or at SD> least as Larch/C++ does:
>>SD> http://www.cs.ucf.edu/~leavens/larchc++manual/lcpp_47.html
> They call them `non-standard escape sequences' for a reason: that they
> are not in standard C++.
> test.cpp:
> char* temp = "abc\yz";
> TEMP> g++ -c test.cpp
> test.cpp:1:1: warning: unknown escape sequence '\y'

Isn't that a warning, not a fatal error? So what does temp contain?


More information about the Python-list mailing list