Apply character{} markup.

This commit is contained in:
Raymond Hettinger 2002-08-07 16:53:17 +00:00
parent 3f19b10ca5
commit 83dcf5a290
1 changed files with 17 additions and 16 deletions

View File

@ -387,14 +387,14 @@ are generally referred to as \emph{triple-quoted strings}). The
backslash (\code{\e}) character is used to escape characters that
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
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, `u' must
appear before `r'.
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
@ -402,8 +402,8 @@ 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
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}
@ -443,12 +443,12 @@ important to note that the escape sequences marked as ``(Unicode
only)'' in the table above fall into the category of unrecognized
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
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
\character{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
@ -537,9 +537,10 @@ lexical definitions:
{\token{digit} | "a"..."f" | "A"..."F"}
\end{productionlist}
Although both lower case `l' and upper case `L' are allowed as suffix
for long integers, it is strongly recommended to always use `L', since
the letter `l' looks too much like the digit `1'.
Although both lower case \character{l} and upper case \character{L} are
allowed as suffix for long integers, it is strongly recommended to always
use \character{L}, since the letter \character{l} looks too much like the
digit \character{1}.
Plain integer decimal literals must be at most 2147483647 (i.e., the
largest positive integer, using 32-bit arithmetic). Plain octal and