os.path.isfile

Chris Angelico rosuav at gmail.com
Sun Feb 12 19:35:13 EST 2017


On Mon, Feb 13, 2017 at 11:34 AM, Erik <python at lucidity.plus.com> wrote:
> OK, I get it now - because '\d' is not a valid escape sequence, then even in
> a non-raw string literal, the '\' is treated as a literal backslash
> character (not an escape).
>
> So, the second string token is NOT being treated as "raw", it just looks
> that way from the repr (and as you point out, a newer version of the parser
> which explicitly complains about invalid escape sequences removes that
> ambiguity).
>

Correct. Our emails crossed in delivery. You've nailed it.

ChrisA



More information about the Python-list mailing list