Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be48646

Browse files
committed
Use \citetitle and \programopt as appropriate.
1 parent 7b8195a commit be48646

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

Doc/api/api.tex

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ \chapter*{Front Matter\label{front}}
2222
\noindent
2323
This manual documents the API used by \C{} (or \Cpp{}) programmers who
2424
want to write extension modules or embed Python. It is a companion to
25-
\emph{Extending and Embedding the Python Interpreter}, which describes
26-
the general principles of extension writing but does not document the
27-
API functions in detail.
25+
\citetitle[../ext/ext.html]{Extending and Embedding the Python
26+
Interpreter}, which describes the general principles of extension
27+
writing but does not document the API functions in detail.
2828

2929
\strong{Warning:} The current version of this document is incomplete.
3030
I hope that it is nevertheless useful. I will continue to work on it,
@@ -109,10 +109,11 @@ \section{Objects, Types and Reference Counts \label{objects}}
109109
All Python objects (even Python integers) have a \dfn{type} and a
110110
\dfn{reference count}. An object's type determines what kind of object
111111
it is (e.g., an integer, a list, or a user-defined function; there are
112-
many more as explained in the \emph{Python Reference Manual}). For
113-
each of the well-known types there is a macro to check whether an
114-
object is of that type; for instance, \samp{PyList_Check(\var{a})} is
115-
true iff the object pointed to by \var{a} is a Python list.
112+
many more as explained in the \citetitle[../ref/ref.html]{Python
113+
Reference Manual}). For each of the well-known types there is a macro
114+
to check whether an object is of that type; for instance,
115+
\samp{PyList_Check(\var{a})} is true if and only if the object pointed
116+
to by \var{a} is a Python list.
116117

117118

118119
\subsection{Reference Counts \label{refcounts}}
@@ -873,11 +874,11 @@ \chapter{Exception Handling \label{exceptionHandling}}
873874
of the form \code{module.class}. The \var{base} and \var{dict}
874875
arguments are normally \NULL{}. Normally, this creates a class
875876
object derived from the root for all exceptions, the built-in name
876-
\exception{Exception} (accessible in \C{} as \cdata{PyExc_Exception}).
877+
\exception{Exception} (accessible in C as \cdata{PyExc_Exception}).
877878
In this case the \member{__module__} attribute of the new class is set to the
878879
first part (up to the last dot) of the \var{name} argument, and the
879880
class name is set to the last part (after the last dot). When the
880-
user has specified the \code{-X} command line option to use string
881+
user has specified the \programopt{-X} command line option to use string
881882
exceptions, for backward compatibility, or when the \var{base}
882883
argument is not a class object (and not \NULL{}), a string object
883884
created from the entire \var{name} argument is returned. The
@@ -890,11 +891,10 @@ \chapter{Exception Handling \label{exceptionHandling}}
890891
\section{Standard Exceptions \label{standardExceptions}}
891892

892893
All standard Python exceptions are available as global variables whose
893-
names are \samp{PyExc_} followed by the Python exception name.
894-
These have the type \ctype{PyObject *}; they are all either class
895-
objects or string objects, depending on the use of the \code{-X}
896-
option to the interpreter. For completeness, here are all the
897-
variables:
894+
names are \samp{PyExc_} followed by the Python exception name. These
895+
have the type \ctype{PyObject *}; they are all either class objects or
896+
string objects, depending on the use of the \programopt{-X} option to the
897+
interpreter. For completeness, here are all the variables:
898898
\cdata{PyExc_Exception},
899899
\cdata{PyExc_StandardError},
900900
\cdata{PyExc_ArithmeticError},
@@ -2126,19 +2126,20 @@ \subsection{Dictionary Objects \label{dictObjects}}
21262126
\begin{cfuncdesc}{PyObject*}{PyDict_Items}{PyDictObject *p}
21272127
Returns a \ctype{PyListObject} containing all the items
21282128
from the dictionary, as in the dictinoary method \method{items()} (see
2129-
the \emph{Python Library Reference}).
2129+
the \citetitle[../lib/lib.html]{Python Library Reference}).
21302130
\end{cfuncdesc}
21312131
21322132
\begin{cfuncdesc}{PyObject*}{PyDict_Keys}{PyDictObject *p}
21332133
Returns a \ctype{PyListObject} containing all the keys
21342134
from the dictionary, as in the dictionary method \method{keys()} (see the
2135-
\emph{Python Library Reference}).
2135+
\citetitle[../lib/lib.html]{Python Library Reference}).
21362136
\end{cfuncdesc}
21372137
21382138
\begin{cfuncdesc}{PyObject*}{PyDict_Values}{PyDictObject *p}
21392139
Returns a \ctype{PyListObject} containing all the values
21402140
from the dictionary \var{p}, as in the dictionary method
2141-
\method{values()} (see the \emph{Python Library Reference}).
2141+
\method{values()} (see the \citetitle[../lib/lib.html]{Python Library
2142+
Reference}).
21422143
\end{cfuncdesc}
21432144
21442145
\begin{cfuncdesc}{int}{PyDict_Size}{PyDictObject *p}

0 commit comments

Comments
 (0)