diff options
author | Raymond Hettinger <python@rcn.com> | 2002-08-06 22:36:26 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-08-06 22:36:26 (GMT) |
commit | d9fdb51df6dc5c9023bcf63996c48162c3770017 (patch) | |
tree | b706134dfd342bc3f363ff93da83e82d2bdaf6f7 | |
parent | 5814187f5b4d1a956c9719de1538865694677b55 (diff) | |
download | cpython-d9fdb51df6dc5c9023bcf63996c48162c3770017.zip cpython-d9fdb51df6dc5c9023bcf63996c48162c3770017.tar.gz cpython-d9fdb51df6dc5c9023bcf63996c48162c3770017.tar.bz2 |
Document handling of raw-unicode-escapes. Closes SF bug 587087.
-rw-r--r-- | Doc/ref/ref2.tex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/ref/ref2.tex b/Doc/ref/ref2.tex index 56d5bb7..e761c8d 100644 --- a/Doc/ref/ref2.tex +++ b/Doc/ref/ref2.tex @@ -457,6 +457,14 @@ escape the following quote character). Note also that a single backslash followed by a newline is interpreted as those two characters as part of the string, \emph{not} as a line continuation. +When an `r' or `R' prefix is used in conjunction with a `u' or `U' +prefix, then the \uXXXX escape sequence is processed while \emph{all other +backslashes are left in the string}. For example, the string literal +\code{ur"\u0062\n"} consists of three Unicode characters: +`LATIN SMALL LETTER B', `REVERSE SOLIDUS', and `LATIN SMALL LETTER N'. +Backslashes can be escaped with a preceding backslash; however, both +remain in the string. As a result, \uXXXX escape sequences are +only recognized when there are an odd number of backslashes. \subsection{String literal concatenation\label{string-catenation}} |