Syntax of string literals

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Mon Nov 13 14:07:06 EST 2000


I am reading in the Reference Manual:

   Unlike Standard C, all unrecognized escape sequences are left in the
   string unchanged, i.e., the backslash is left in the string.
   (This behavior is useful when debugging: if an escape sequence is
   mistyped, the resulting output is more easily recognized as broken.)

Why aren't unrecognized escape sequences simply illegal?
They would be yet more easily recognized as broken.

They would still be legal in raw strings.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list