How to split with "\" character, and licence copyleft mirror of (c)

Chris Angelico rosuav at gmail.com
Mon Sep 2 17:30:52 EDT 2013


On Tue, Sep 3, 2013 at 6:22 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
> In a raw string, the backslash is buggy (IMNSHO) when it's the last
> character.

It's an inevitable consequence of using the backslash to escape the
quote character. If instead, a raw string doubled the quote character
(like in REXX), it'd need no other escape:

r'\' --> '\\'
r'''' --> "'"

Too late to change now.

ChrisA



More information about the Python-list mailing list