RFC PEP candidate: q'<delim>'quoted<delim> ?
phil hunt
philh at comuno.freeserve.co.uk
Wed Mar 13 09:39:29 EST 2002
On 13 Mar 2002 01:13:13 GMT, Bengt Richter <bokr at oz.net> wrote:
>>>
>>> q'|'c:\foo\bar\|
>>
>>"""c:\foo\bar\""" and r"c:\foo\bar\" work just as well.
>>
>You didn't mean that ;-)
>
> >>> """c:\foo\bar\"""
> ...
> ... (it's waiting for three unescaped quotes in a row)
> ... """
> 'c:\x0coo\x08ar"""\n\n(it\'s waiting for three unescaped quotes in a row)\n'
> >>>
> >>> r"c:\foo\bar\"
> File "<string>", line 1
> r"c:\foo\bar\"
> ^
> SyntaxError: invalid token
> >>>
>
>>The best solution, of course, is to not use Windows.
>>
>You probably did mean that ;-)
Absolutely. It's the solution I use, and it's never failed me yet.
--
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically
advantageous for him to believe."
-- Alison Brooks, referring to Michael
Portillo, on soc.history.what-if
More information about the Python-list
mailing list