Douglas Alan wrote:
So, what's the one obvious right way to express "foo\zbar"? Is it
   "foo\zbar"
or
   "foo\\zbar"
And if it's the latter, what possible benefit is there in allowing the
former?  And if it's the former, why does Python echo the latter?

Actually, if we were designing from fresh (with no C behind us), I might
advocate for "\s" to be the escape sequence for a backslash.  I don't
particularly like that it is hard to see if the following string
contains a tab:   "abc\\\\\\\\\table".  The string rules reflect C's
rules, and I see little excuse for trying to change them now.

--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to