mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Typos reported by Tamito Kajiyama.
This commit is contained in:
parent
f630f6b93d
commit
d16ddb610a
2 changed files with 4 additions and 4 deletions
|
|
@ -196,7 +196,7 @@ or \code{NULL} if no exception has occurred. You normally don't need
|
||||||
to call \code{PyErr_Occurred()} to see whether an error occurred in a
|
to call \code{PyErr_Occurred()} to see whether an error occurred in a
|
||||||
function call, since you should be able to tell from the return value.
|
function call, since you should be able to tell from the return value.
|
||||||
|
|
||||||
When a function \var{f} that calls another function var{g} detects
|
When a function \var{f} that calls another function \var{g} detects
|
||||||
that the latter fails, \var{f} should itself return an error value
|
that the latter fails, \var{f} should itself return an error value
|
||||||
(e.g. \code{NULL} or \code{-1}). It should \emph{not} call one of the
|
(e.g. \code{NULL} or \code{-1}). It should \emph{not} call one of the
|
||||||
\code{PyErr_*()} functions --- one has already been called by \var{g}.
|
\code{PyErr_*()} functions --- one has already been called by \var{g}.
|
||||||
|
|
@ -305,7 +305,7 @@ passing it the string we just got from \code{PyArg_ParseTuple()}:
|
||||||
sts = system(command);
|
sts = system(command);
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Our \code{spam.system()} function must return the value of \code{sys}
|
Our \code{spam.system()} function must return the value of \code{sts}
|
||||||
as a Python object. This is done using the function
|
as a Python object. This is done using the function
|
||||||
\code{Py_BuildValue()}, which is something like the inverse of
|
\code{Py_BuildValue()}, which is something like the inverse of
|
||||||
\code{PyArg_ParseTuple()}: it takes a format string and an arbitrary
|
\code{PyArg_ParseTuple()}: it takes a format string and an arbitrary
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ or \code{NULL} if no exception has occurred. You normally don't need
|
||||||
to call \code{PyErr_Occurred()} to see whether an error occurred in a
|
to call \code{PyErr_Occurred()} to see whether an error occurred in a
|
||||||
function call, since you should be able to tell from the return value.
|
function call, since you should be able to tell from the return value.
|
||||||
|
|
||||||
When a function \var{f} that calls another function var{g} detects
|
When a function \var{f} that calls another function \var{g} detects
|
||||||
that the latter fails, \var{f} should itself return an error value
|
that the latter fails, \var{f} should itself return an error value
|
||||||
(e.g. \code{NULL} or \code{-1}). It should \emph{not} call one of the
|
(e.g. \code{NULL} or \code{-1}). It should \emph{not} call one of the
|
||||||
\code{PyErr_*()} functions --- one has already been called by \var{g}.
|
\code{PyErr_*()} functions --- one has already been called by \var{g}.
|
||||||
|
|
@ -305,7 +305,7 @@ passing it the string we just got from \code{PyArg_ParseTuple()}:
|
||||||
sts = system(command);
|
sts = system(command);
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Our \code{spam.system()} function must return the value of \code{sys}
|
Our \code{spam.system()} function must return the value of \code{sts}
|
||||||
as a Python object. This is done using the function
|
as a Python object. This is done using the function
|
||||||
\code{Py_BuildValue()}, which is something like the inverse of
|
\code{Py_BuildValue()}, which is something like the inverse of
|
||||||
\code{PyArg_ParseTuple()}: it takes a format string and an arbitrary
|
\code{PyArg_ParseTuple()}: it takes a format string and an arbitrary
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue