Mercurial > cpython-lru_cache-weakref
diff Doc/api/api.tex @ 16318:17cac70cae76 legacy-trunk
Document the PyInstance_*() functions and data.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Sun, 28 Jan 2001 06:39:35 +0000 |
| parents | aca05d75d232 |
| children | d557ff0a2f6c |
line wrap: on
line diff
--- a/Doc/api/api.tex Sun Jan 28 05:07:00 2001 +0000 +++ b/Doc/api/api.tex Sun Jan 28 06:39:35 2001 +0000 @@ -3694,6 +3694,36 @@ \end{cfuncdesc} +\subsection{Instance Objects \label{instanceObjects}} + +\obindex{instance} +There are very few functions specific to instance objects. + +\begin{cvardesc}{PyTypeObject}{PyInstance_Type} + Type object for class instances. +\end{cvardesc} + +\begin{cfuncdesc}{int}{PyInstance_Check}{PyObject *obj} + Returns true if \var{obj} is an instance. +\end{cfuncdesc} + +\begin{cfuncdesc}{PyObject*}{PyInstance_New}{PyObject *class, + PyObject *arg, + PyObject *kw} + Create a new instance of a specific class. The parameters \var{arg} + and \var{kw} are used as the positional and keyword parameters to + the object's constructor. +\end{cfuncdesc} + +\begin{cfuncdesc}{PyObject*}{PyInstance_NewRaw}{PyObject *class, + PyObject *dict} + Create a new instance of a specific class without calling it's + constructor. \var{class} is the class of new object. The + \var{dict} parameter will be used as the object's \member{__dict__}; + if \NULL, a new dictionary will be created for the instance. +\end{cfuncdesc} + + \subsection{Module Objects \label{moduleObjects}} \obindex{module} @@ -4737,8 +4767,6 @@ DL_IMPORT -Py*_Check - _Py_NoneStruct
