String handling bug in Python

Colin Brown cbrown at metservice.com
Tue Apr 23 20:57:02 EDT 2002


Thanks guys

I did not think to look up this  "documented feature", sorry.

It still looks like a cop-out to me and can join my "ugly list" along with
leading-zero octal numbers.

Colin Brown
PyNZ


"Colin Brown" <cbrown at metservice.com> wrote in message
news:3cc5d5c8$1 at news.nz.asiaonline.net...
> I have entered the following at the command line in Python 2.1.1 on Linux
> and in Python 2.2 on NT and get the same results:
>
> >>> r'\'
>   File "<string>", line 1
>      r'\'
>         ^
> SyntaxError: invalid token
> >>>
>
> It appears as if the r option for strings does not handle a backslash as
the
> last string character properly.
>
> Colin Brown
> PyNZ
>
>
>





More information about the Python-list mailing list