Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Best Practice Question

Thread Tools

Re: Best Practice Question

Albert Hopkins
Posts: n/a

> By the way, did someone ever notice that r'\' fails ? I'm sure there's a
> reason for that... (python 2.5) Anyone knows ?
> r'\'
> SyntaxError: EOL while scanning single-quoted string

"Even in a raw string, string quotes can be escaped with a backslash,
but the backslash remains in the string; for example, r"\"" is a valid
string literal consisting of two characters: a backslash and a double
quote; r"\" is not a valid string literal (even a raw string cannot end
in an odd number of backslashes). Specifically, a raw string cannot end
in a single backslash (since the backslash would escape the following
quote character). " -- python docs
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
hidden data - best practice, best way, suggestions oldyork90 Javascript 1 09-10-2008 07:46 PM
Best Practice Question Josh ASP .Net 3 06-23-2005 04:35 PM
Remember when your piano teacher taught you, "Practice, practice,practice ...?" Wayne Wastier Windows 64bit 3 06-10-2005 08:29 PM
Best Practice - Question Prince ASP .Net 1 01-19-2004 01:54 PM
best practice question regarding AspState database for sessions Bryan Ax ASP .Net 0 06-26-2003 07:12 PM