[Python-checkins] python/dist/src/Doc/ref ref2.tex,1.34.6.3,1.34.6.4
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
2002年8月09日 13:41:22 -0700
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv11954
Modified Files:
Tag: release22-maint
ref2.tex
Log Message:
Correct and update markup to match what we're doing on the trunk.
Index: ref2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v
retrieving revision 1.34.6.3
retrieving revision 1.34.6.4
diff -C2 -d -r1.34.6.3 -r1.34.6.4
*** ref2.tex 6 Aug 2002 22:39:30 -0000 1.34.6.3
--- ref2.tex 9 Aug 2002 20:41:19 -0000 1.34.6.4
***************
*** 354,375 ****
otherwise have a special meaning, such as newline, backslash itself,
or the quote character. String literals may optionally be prefixed
! with a letter `r' or `R'; such strings are called \dfn{raw
! strings}\index{raw string} and use different rules for interpreting
! backslash escape sequences. A prefix of 'u' or 'U' makes the string
! a Unicode string. Unicode strings use the Unicode character set as
! defined by the Unicode Consortium and ISO~10646. Some additional
! escape sequences, described below, are available in Unicode strings.
! The two prefix characters may be combined; in this case, `u' must
! appear before `r'.
! In triple-quoted strings,
! unescaped newlines and quotes are allowed (and are retained), except
! that three unescaped quotes in a row terminate the string. (A
! ``quote'' is the character used to open the string, i.e. either
! \code{'} or \code{"}.)
! Unless an `r' or `R' prefix is present, escape sequences in strings
! are interpreted according to rules similar
! to those used by Standard C. The recognized escape sequences are:
\index{physical line}
\index{escape sequence}
--- 354,375 ----
otherwise have a special meaning, such as newline, backslash itself,
or the quote character. String literals may optionally be prefixed
! with a letter \character{r} or \character{R}; such strings are called
! \dfn{raw strings}\index{raw string} and use different rules for
! interpreting backslash escape sequences. A prefix of \character{u} or
! \character{U} makes the string a Unicode string. Unicode strings use
! the Unicode character set as defined by the Unicode Consortium and
! ISO~10646. Some additional escape sequences, described below, are
! available in Unicode strings. The two prefix characters may be
! combined; in this case, \character{u} must appear before
! \character{r}.
! In triple-quoted strings, unescaped newlines and quotes are allowed
! (and are retained), except that three unescaped quotes in a row
! terminate the string. (A ``quote'' is the character used to open the
! string, i.e. either \code{'} or \code{"}.)
! Unless an \character{r} or \character{R} prefix is present, escape
! sequences in strings are interpreted according to rules similar to
! those used by Standard C. The recognized escape sequences are:
\index{physical line}
\index{escape sequence}
***************
*** 410,435 ****
escapes for non-Unicode string literals.
! When an `r' or `R' prefix is present, a character following a
! backslash is included in the string without change, and \emph{all
! backslashes are left in the string}. For example, the string literal
! \code{r"\e n"} consists of two characters: a backslash and a lowercase
! `n'. String quotes can be escaped with a backslash, but the backslash
! remains in the string; for example, \code{r"\e""} is a valid string
! literal consisting of two characters: a backslash and a double quote;
! \code{r"\e"} is not a valid string literal (even a raw string cannot
! end in an odd number of backslashes). Specifically, \emph{a raw
! string cannot end in a single backslash} (since the backslash would
! 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}}
--- 410,436 ----
escapes for non-Unicode string literals.
! When an \character{r} or \character{R} prefix is present, a character
! following a backslash is included in the string without change, and
! \emph{all backslashes are left in the string}. For example, the
! string literal \code{r"\e n"} consists of two characters: a backslash
! and a lowercase `n'. String quotes can be escaped with a backslash,
! but the backslash remains in the string; for example, \code{r"\e""} is
! a valid string literal consisting of two characters: a backslash and a
! double quote; \code{r"\e"} is not a valid string literal (even a raw
! string cannot end in an odd number of backslashes). Specifically,
! \emph{a raw string cannot end in a single backslash} (since the
! backslash would 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 \character{r} or \character{R} prefix is used in conjunction
! with a \character{u} or \character{U} prefix, then the \code{\e uXXXX}
! escape sequence is processed while \emph{all other backslashes are
! left in the string}. For example, the string literal
! \code{ur"\e u0062\e 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, \code{\e uXXXX} escape sequences
! are only recognized when there are an odd number of backslashes.
\subsection{String literal concatenation\label{string-catenation}}