cpython/Doc/api/api.tex

61 lines
1.2 KiB
TeX
Raw Normal View History

\documentclass{manual}
\title{Python/C API Reference Manual}
\input{boilerplate}
\makeindex % tell \index to actually write the .idx file
\begin{document}
\maketitle
\ifhtml
\chapter*{Front Matter\label{front}}
\fi
\input{copyright}
\begin{abstract}
\noindent
This manual documents the API used by C and \Cpp{} programmers who
Lots of nitty-gritty stuff: Use \emph{} when referring to title of any of the Python manuals, like is done in the other manuals. In some places, use \emph{} or \dfn{} instead of ``...''. Use \samp{} instead of \code{} when marking identifier prefixes. Use logical markup wherever it made sense. Fixed a bunch of typos. In several places, use "---" instead of "--" to get the emdash. Start sentences with capital letters and end them with periods, as needed. "it's" --> "its" in many places: "it's" it *always* a contraction of "it is", and "its" should always be used for the possessive. "don't" --> "doesn't" "should discards any" --> "should discard any" In C function descriptions, use \var{} to mark parameters in the running text instead of \code{}. This matches usage in the other manauls better, and is more consistent with the formatting of the function signatures. Lots of little changes to implement this. Lots of fixups needed due to appearant heavy cut-&-paste in the orignal document. Mention that the exception objects may be either classes or strings, depending on the use of -X; they were unequivocally stated to be strings in the section "Standard Exceptions". "mkvalue()" --> "Py_BuildValue()" Description of PyNumber_Power() indicates that the third value is option, but not how to indicate that it was omitted. Clarified. Explain the behavior of PyString_FromStringAndSize() if the buffer is NULL. Explain the Py_complex structure a little (tell what it's used for) and use a {verbatim} environment for the structure definition itself. Fix explanation of PyFile_SoftSpace(). Update the example version string to 1.5. Combined the sections on defining new object types.
1998-02-16 02:15:35 -04:00
want to write extension modules or embed Python. It is a companion to
\citetitle[../ext/ext.html]{Extending and Embedding the Python
Interpreter}, which describes the general principles of extension
writing but does not document the API functions in detail.
\warning{The current version of this document is incomplete. I hope
that it is nevertheless useful. I will continue to work on it, and
release new versions from time to time, independent from Python source
code releases.}
\end{abstract}
\tableofcontents
\input{intro}
\input{veryhigh}
\input{refcounting}
\input{exceptions}
\input{utilities}
\input{abstract}
\input{concrete}
\input{init}
\input{memory}
\input{newtypes}
\appendix
\chapter{Reporting Bugs}
\input{reportingbugs}
\chapter{History and License}
\input{license}
\input{api.ind} % Index -- must be last
\end{document}