Unrecognized escape sequences in string literals
Piet van Oostrum
piet at cs.uu.nl
Tue Aug 11 09:50:01 EDT 2009
>>>>> 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'
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list