[Python-Dev] \u and \U escapes in raw unicode string literals
Guido van Rossum
guido at python.org
Sat May 12 01:16:26 CEST 2007
I think I'm going to break my own rules and ask Martin to write up a
PEP. Given the pragmatics that Windows pathnames *are* a common use
case, I'm willing to let allow the trailing \ in the string. A regular
expression containing a quote could be written using triple quotes,
e.g. r"""(["'])[^"']*\1""". (A single " in a regular expression can
always be rewritten as ["] AFAIK.)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list