String handling bug in Python

Ture Pålsson ture at lysator.liu.se
Sat Apr 27 18:58:11 EDT 2002


Tim Peters <tim.one at comcast.net> writes:

> Don't brush that off, because it's the heart of the problem:  you need
> *some* way to detect where the "TRULY raw string literal" ends.  Whatever
> way you pick to spell that then becomes "a problem" if you want to include
> the very same spelling *in* the raw string literal.

Obviously, the string containing just a single quote is written as

  1H'

just as the string containing three backslashes is written as

  3H\\\

:-)

  -- 4HTure




More information about the Python-list mailing list