RFC PEP candidate: q'<delim>'quoted<delim> ?

Roman Suzi rnd at onego.ru
Sun Mar 3 06:56:45 EST 2002


On 3 Mar 2002, Bengt Richter wrote:

>Problem: How to put quotes around an arbitrary program text?

Have it in a separate file.

>Obviously a program may contain quoted material using all the
>defined string quoting methods (and this new method as well),
>so the problem is defining delimiters that won't occur in the text.
>
>I propose using a variation of the MIME multipart delimiter idea:
>
>Note the lack of quotes around the final delimiter string, since it itself is
>the final delimiter. This can also be used to solve the final unescaped
>backslash problem for quoting windows paths:
>
>    q'|'c:\foo\bar\|

Making Python as gibberish as Perl is. And all that only to
have Windows path be written without double-\
AFAIK, latest Windows also use / for delimiting dirs.
So this is non-problem.

>Regards,
>Bengt Richter
>
>

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Sunday, March 03, 2002 _/ Powered by Linux RedHat 6.2 _/
_/ "Why build a wall round a cemetery when no-one wants to get in?" _/





More information about the Python-list mailing list