When does the escape character work within raw strings?

MRAB google at mrabarnett.plus.com
Fri May 22 11:43:35 EDT 2009


Steven D'Aprano wrote:
[snip]
> But if you forget that Python uses backslash escapes in strings, and just 
> write "\b", then the compiler creates the string chr(8) (BEL), which has 
> no special meaning to the RE engine.
> 
"\b" or chr(8) is BS (backspace); "\a" or chr(7) is BEL (bell).



More information about the Python-list mailing list