diff options
author | Collin Winter <collinw@gmail.com> | 2007-03-30 14:01:25 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-03-30 14:01:25 (GMT) |
commit | d4a0118029fb2394c7395e3aad8e21b67caf1ef3 (patch) | |
tree | c9ae7ebb895fed6abff0968bf227dbb31b90f052 /Doc | |
parent | 93c33680a031a5b2b11aaebe0f6dcc1b803f7be1 (diff) | |
download | cpython-d4a0118029fb2394c7395e3aad8e21b67caf1ef3.zip cpython-d4a0118029fb2394c7395e3aad8e21b67caf1ef3.tar.gz cpython-d4a0118029fb2394c7395e3aad8e21b67caf1ef3.tar.bz2 |
Bug #1688274: add documentation for C-level class objects.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/api/concrete.tex | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index 3b2945e..10f898e 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -2162,6 +2162,35 @@ def PyDict_MergeFromSeq2(a, seq2, override): \section{Other Objects \label{otherObjects}} +\subsection{Class Objects \label{classObjects}} + +\obindex{class} +Note that the class objects described here represent old-style classes, +which will go away in Python 3. When creating new types for extension +modules, you will want to work with type objects (section +\ref{typeObjects}). + +\begin{ctypedesc}{PyClassObject} + The C structure of the objects used to describe built-in classes. +\end{ctypedesc} + +\begin{cvardesc}{PyObject*}{PyClass_Type} + This is the type object for class objects; it is the same object as + \code{types.ClassType} in the Python layer. + \withsubitem{(in module types)}{\ttindex{ClassType}} +\end{cvardesc} + +\begin{cfuncdesc}{int}{PyClass_Check}{PyObject *o} + Return true if the object \var{o} is a class object, including + instances of types derived from the standard class object. Return + false in all other cases. +\end{cfuncdesc} + +\begin{cfuncdesc}{int}{PyClass_IsSubclass}{PyObject *klass, PyObject *base} + Return true if \var{klass} is a subclass of \var{base}. Return false in + all other cases. +\end{cfuncdesc} + \subsection{File Objects \label{fileObjects}} \obindex{file} |