Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
f8d7a5d3
Kaydet (Commit)
f8d7a5d3
authored
Eyl 06, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Document the PyMethod_* type object, functions, and macros.
üst
0511b764
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
api.tex
Doc/api/api.tex
+58
-0
No files found.
Doc/api/api.tex
Dosyayı görüntüle @
f8d7a5d3
...
...
@@ -4089,6 +4089,64 @@ There are very few functions specific to instance objects.
\end{cfuncdesc}
\subsection
{
Method Objects
\label
{
method-objects
}}
\obindex
{
method
}
There are some useful functions that are useful for working with
method objects.
\begin{cvardesc}
{
PyTypeObject
}{
PyMethod
_
Type
}
This instance of
\ctype
{
PyTypeObject
}
represents the Python method
type. This is exposed to Python programs as
\code
{
types.MethodType
}
.
\withsubitem
{
(in module types)
}{
\ttindex
{
MethodType
}}
\end{cvardesc}
\begin{cfuncdesc}
{
int
}{
PyMethod
_
Check
}{
PyObject *o
}
Return true if
\var
{
o
}
is a method object (has type
\cdata
{
PyMethod
_
Type
}
). The parameter must not be
\NULL
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyMethod
_
New
}{
PyObject *func.
PyObject *self, PyObject *class
}
Return a new method object, with
\var
{
func
}
being any callable
object; this is the function that will be called when the method is
called. If this method should be bound to an instance,
\var
{
self
}
should be the instance and
\var
{
class
}
should be the class of
\var
{
self
}
, otherwise
\var
{
self
}
should be
\NULL
{}
and
\var
{
class
}
should be the class which provides the unbound method..
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyMethod
_
Class
}{
PyObject *meth
}
Return the class object from which the method
\var
{
meth
}
was
created; if this was created from an instance, it will be the class
of the instance.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyMethod
_
GET
_
CLASS
}{
PyObject *meth
}
Macro version of
\cfunction
{
PyMethod
_
Class()
}
which avoids error
checking.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyMethod
_
Function
}{
PyObject *meth
}
Return the function object associated with the method
\var
{
meth
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyMethod
_
GET
_
FUNCTION
}{
PyObject *meth
}
Macro version of
\cfunction
{
PyMethod
_
Function()
}
which avoids error
checking.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyMethod
_
Self
}{
PyObject *meth
}
Return the instance associated with the method
\var
{
meth
}
if it is
bound, otherwise return
\NULL
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyMethod
_
GET
_
SELF
}{
PyObject *meth
}
Macro version of
\cfunction
{
PyMethod
_
Self()
}
which avoids error
checking.
\end{cfuncdesc}
\subsection
{
Module Objects
\label
{
moduleObjects
}}
\obindex
{
module
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment