Kaydet (Commit) 5cb29a49 authored tarafından Fred Drake's avatar Fred Drake

Fix a number of minor markup errors, and improve the consistency a bit.

üst 46ccd1da
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
\modulesynopsis{Compile (possibly incomplete) Python code.} \modulesynopsis{Compile (possibly incomplete) Python code.}
The \module{codeop} module provides utilities upon which the Python The \module{codeop} module provides utilities upon which the Python
read-eval-print loop can be emulated -- as in the \refmodule{code} read-eval-print loop can be emulated, as is done in the
module. As a result, you probably don't want to use the module \refmodule{code} module. As a result, you probably don't want to use
directly -- if you want to include such a loop in your program you the module directly; if you want to include such a loop in your
probably want to use the \refmodule{code} instead. program you probably want to use the \refmodule{code} module instead.
There are two parts to this job: There are two parts to this job:
\begin{list} \begin{enumerate}
\listitem Being able to tell if a line of input completes a Python \item Being able to tell if a line of input completes a Python
statement -- in short telling whether to print ``>>> '' or statement: in short, telling whether to print
``... '' next. `\code{>\code{>}>~} or `\code{...~}' next.
\listitem Remembering which future statements the user has entered, so \item Remembering which future statements the user has entered, so
subsequent input can be compiled wiht these in effect. subsequent input can be compiled with these in effect.
\end{list} \end{enumerate}
The \module{codeop} module provides a way of doing each of these The \module{codeop} module provides a way of doing each of these
things, and a way of doing them both. things, and a way of doing them both.
...@@ -58,17 +58,17 @@ for the parser is better. ...@@ -58,17 +58,17 @@ for the parser is better.
\end{funcdesc} \end{funcdesc}
\begin{classdesc}{Compile}{} \begin{classdesc}{Compile}{}
Instances of this class have \method{__call__} methods indentical in Instances of this class have \method{__call__()} methods indentical in
signature to the built-in function \function{compile}, but with the signature to the built-in function \function{compile()}, but with the
difference that if the instance compiles program text containing a difference that if the instance compiles program text containing a
\module{__future__} statement, the instance 'remembers' and compiles \module{__future__} statement, the instance 'remembers' and compiles
all subsequent program texts with the statement in force. all subsequent program texts with the statement in force.
\end{classdesc} \end{classdesc}
\begin{classdesc}{CommandCompiler}{} \begin{classdesc}{CommandCompiler}{}
Instances of this class have \method{__call__} methods identical in Instances of this class have \method{__call__()} methods identical in
signature to \function{compile_command}; the difference is that if the signature to \function{compile_command()}; the difference is that if
instance compiles program text containing a \method{__future__} the instance compiles program text containing a \code{__future__}
statement, the instance 'remembers' and compiles all subsequent statement, the instance 'remembers' and compiles all subsequent
program texts with the statement in force. program texts with the statement in force.
\end{classdesc} \end{classdesc}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment