mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
replace ASCII by macro call
This commit is contained in:
parent
9b623b3d63
commit
47b4c0fb35
8 changed files with 36 additions and 36 deletions
|
@ -65,7 +65,7 @@ first beginning with a vertical bar.
|
|||
|
||||
In lexical definitions (as the example above), two more conventions
|
||||
are used: Two literal characters separated by three dots mean a choice
|
||||
of any single character in the given (inclusive) range of ASCII
|
||||
of any single character in the given (inclusive) range of \ASCII{}
|
||||
characters. A phrase between angular brackets (\verb@<...>@) gives an
|
||||
informal description of the symbol defined; e.g. this could be used
|
||||
to describe the notion of `control character' if needed.
|
||||
|
|
|
@ -233,16 +233,16 @@ to those used by Standard C. The recognized escape sequences are:
|
|||
\verb/\\/ & Backslash (\verb/\/) \\
|
||||
\verb/\'/ & Single quote (\verb/'/) \\
|
||||
\verb/\"/ & Double quote (\verb/"/) \\
|
||||
\verb/\a/ & ASCII Bell (BEL) \\
|
||||
\verb/\b/ & ASCII Backspace (BS) \\
|
||||
%\verb/\E/ & ASCII Escape (ESC) \\
|
||||
\verb/\f/ & ASCII Formfeed (FF) \\
|
||||
\verb/\n/ & ASCII Linefeed (LF) \\
|
||||
\verb/\r/ & ASCII Carriage Return (CR) \\
|
||||
\verb/\t/ & ASCII Horizontal Tab (TAB) \\
|
||||
\verb/\v/ & ASCII Vertical Tab (VT) \\
|
||||
\verb/\/{\em ooo} & ASCII character with octal value {\em ooo} \\
|
||||
\verb/\x/{\em xx...} & ASCII character with hex value {\em xx...} \\
|
||||
\verb/\a/ & \ASCII{} Bell (BEL) \\
|
||||
\verb/\b/ & \ASCII{} Backspace (BS) \\
|
||||
%\verb/\E/ & \ASCII{} Escape (ESC) \\
|
||||
\verb/\f/ & \ASCII{} Formfeed (FF) \\
|
||||
\verb/\n/ & \ASCII{} Linefeed (LF) \\
|
||||
\verb/\r/ & \ASCII{} Carriage Return (CR) \\
|
||||
\verb/\t/ & \ASCII{} Horizontal Tab (TAB) \\
|
||||
\verb/\v/ & \ASCII{} Vertical Tab (VT) \\
|
||||
\verb/\/{\em ooo} & \ASCII{} character with octal value {\em ooo} \\
|
||||
\verb/\x/{\em xx...} & \ASCII{} character with hex value {\em xx...} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
@ -358,7 +358,7 @@ meaning:
|
|||
= ;
|
||||
\end{verbatim}
|
||||
|
||||
The following printing ASCII characters are not used in Python. Their
|
||||
The following printing \ASCII{} characters are not used in Python. Their
|
||||
occurrence outside string literals and comments is an unconditional
|
||||
error:
|
||||
\index{ASCII}
|
||||
|
|
|
@ -211,7 +211,7 @@ character type; a character is represented by a string of one element.
|
|||
Characters represent (at least) 8-bit bytes. The built-in
|
||||
functions \verb@chr()@ and \verb@ord()@ convert between characters
|
||||
and nonnegative integers representing the byte values.
|
||||
Bytes with the values 0-127 represent the corresponding ASCII values.
|
||||
Bytes with the values 0-127 represent the corresponding \ASCII{} values.
|
||||
The string data type is also used to represent arrays of bytes, e.g.
|
||||
to hold data read from a file.
|
||||
\obindex{string}
|
||||
|
@ -221,10 +221,10 @@ to hold data read from a file.
|
|||
\bifuncindex{chr}
|
||||
\bifuncindex{ord}
|
||||
|
||||
(On systems whose native character set is not ASCII, strings may use
|
||||
(On systems whose native character set is not \ASCII{}, strings may use
|
||||
EBCDIC in their internal representation, provided the functions
|
||||
\verb@chr()@ and \verb@ord()@ implement a mapping between ASCII and
|
||||
EBCDIC, and string comparison preserves the ASCII order.
|
||||
\verb@chr()@ and \verb@ord()@ implement a mapping between \ASCII{} and
|
||||
EBCDIC, and string comparison preserves the \ASCII{} order.
|
||||
Or perhaps someone can propose a better rule?)
|
||||
\index{ASCII}
|
||||
\index{EBCDIC}
|
||||
|
|
|
@ -65,7 +65,7 @@ first beginning with a vertical bar.
|
|||
|
||||
In lexical definitions (as the example above), two more conventions
|
||||
are used: Two literal characters separated by three dots mean a choice
|
||||
of any single character in the given (inclusive) range of ASCII
|
||||
of any single character in the given (inclusive) range of \ASCII{}
|
||||
characters. A phrase between angular brackets (\verb@<...>@) gives an
|
||||
informal description of the symbol defined; e.g. this could be used
|
||||
to describe the notion of `control character' if needed.
|
||||
|
|
22
Doc/ref2.tex
22
Doc/ref2.tex
|
@ -233,16 +233,16 @@ to those used by Standard C. The recognized escape sequences are:
|
|||
\verb/\\/ & Backslash (\verb/\/) \\
|
||||
\verb/\'/ & Single quote (\verb/'/) \\
|
||||
\verb/\"/ & Double quote (\verb/"/) \\
|
||||
\verb/\a/ & ASCII Bell (BEL) \\
|
||||
\verb/\b/ & ASCII Backspace (BS) \\
|
||||
%\verb/\E/ & ASCII Escape (ESC) \\
|
||||
\verb/\f/ & ASCII Formfeed (FF) \\
|
||||
\verb/\n/ & ASCII Linefeed (LF) \\
|
||||
\verb/\r/ & ASCII Carriage Return (CR) \\
|
||||
\verb/\t/ & ASCII Horizontal Tab (TAB) \\
|
||||
\verb/\v/ & ASCII Vertical Tab (VT) \\
|
||||
\verb/\/{\em ooo} & ASCII character with octal value {\em ooo} \\
|
||||
\verb/\x/{\em xx...} & ASCII character with hex value {\em xx...} \\
|
||||
\verb/\a/ & \ASCII{} Bell (BEL) \\
|
||||
\verb/\b/ & \ASCII{} Backspace (BS) \\
|
||||
%\verb/\E/ & \ASCII{} Escape (ESC) \\
|
||||
\verb/\f/ & \ASCII{} Formfeed (FF) \\
|
||||
\verb/\n/ & \ASCII{} Linefeed (LF) \\
|
||||
\verb/\r/ & \ASCII{} Carriage Return (CR) \\
|
||||
\verb/\t/ & \ASCII{} Horizontal Tab (TAB) \\
|
||||
\verb/\v/ & \ASCII{} Vertical Tab (VT) \\
|
||||
\verb/\/{\em ooo} & \ASCII{} character with octal value {\em ooo} \\
|
||||
\verb/\x/{\em xx...} & \ASCII{} character with hex value {\em xx...} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
@ -358,7 +358,7 @@ meaning:
|
|||
= ;
|
||||
\end{verbatim}
|
||||
|
||||
The following printing ASCII characters are not used in Python. Their
|
||||
The following printing \ASCII{} characters are not used in Python. Their
|
||||
occurrence outside string literals and comments is an unconditional
|
||||
error:
|
||||
\index{ASCII}
|
||||
|
|
|
@ -211,7 +211,7 @@ character type; a character is represented by a string of one element.
|
|||
Characters represent (at least) 8-bit bytes. The built-in
|
||||
functions \verb@chr()@ and \verb@ord()@ convert between characters
|
||||
and nonnegative integers representing the byte values.
|
||||
Bytes with the values 0-127 represent the corresponding ASCII values.
|
||||
Bytes with the values 0-127 represent the corresponding \ASCII{} values.
|
||||
The string data type is also used to represent arrays of bytes, e.g.
|
||||
to hold data read from a file.
|
||||
\obindex{string}
|
||||
|
@ -221,10 +221,10 @@ to hold data read from a file.
|
|||
\bifuncindex{chr}
|
||||
\bifuncindex{ord}
|
||||
|
||||
(On systems whose native character set is not ASCII, strings may use
|
||||
(On systems whose native character set is not \ASCII{}, strings may use
|
||||
EBCDIC in their internal representation, provided the functions
|
||||
\verb@chr()@ and \verb@ord()@ implement a mapping between ASCII and
|
||||
EBCDIC, and string comparison preserves the ASCII order.
|
||||
\verb@chr()@ and \verb@ord()@ implement a mapping between \ASCII{} and
|
||||
EBCDIC, and string comparison preserves the \ASCII{} order.
|
||||
Or perhaps someone can propose a better rule?)
|
||||
\index{ASCII}
|
||||
\index{EBCDIC}
|
||||
|
|
|
@ -1398,7 +1398,7 @@ the lexicographical comparison is carried out recursively. If all
|
|||
items of two sequences compare equal, the sequences are considered
|
||||
equal. If one sequence is an initial subsequence of the other, the
|
||||
shorted sequence is the smaller one. Lexicographical ordering for
|
||||
strings uses the ASCII ordering for individual characters. Some
|
||||
strings uses the \ASCII{} ordering for individual characters. Some
|
||||
examples of comparisons between sequences with the same types:
|
||||
|
||||
\bcode\begin{verbatim}
|
||||
|
@ -3301,7 +3301,7 @@ Note that \code{pickle} does not open or close any files --- it can be
|
|||
used equally well for moving objects around on a network or store them
|
||||
in a database. For ease of debugging, and the inevitable occasional
|
||||
manual patch-up, the constructed byte streams consist of printable
|
||||
ASCII characters only (though it's not designed to be pretty).
|
||||
\ASCII{} characters only (though it's not designed to be pretty).
|
||||
|
||||
The module \code{shelve} provides a simple model for storing objects
|
||||
on files. The operation \code{shelve.open(filename)} returns a
|
||||
|
|
|
@ -1398,7 +1398,7 @@ the lexicographical comparison is carried out recursively. If all
|
|||
items of two sequences compare equal, the sequences are considered
|
||||
equal. If one sequence is an initial subsequence of the other, the
|
||||
shorted sequence is the smaller one. Lexicographical ordering for
|
||||
strings uses the ASCII ordering for individual characters. Some
|
||||
strings uses the \ASCII{} ordering for individual characters. Some
|
||||
examples of comparisons between sequences with the same types:
|
||||
|
||||
\bcode\begin{verbatim}
|
||||
|
@ -3301,7 +3301,7 @@ Note that \code{pickle} does not open or close any files --- it can be
|
|||
used equally well for moving objects around on a network or store them
|
||||
in a database. For ease of debugging, and the inevitable occasional
|
||||
manual patch-up, the constructed byte streams consist of printable
|
||||
ASCII characters only (though it's not designed to be pretty).
|
||||
\ASCII{} characters only (though it's not designed to be pretty).
|
||||
|
||||
The module \code{shelve} provides a simple model for storing objects
|
||||
on files. The operation \code{shelve.open(filename)} returns a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue