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
05a2fc22
Kaydet (Commit)
05a2fc22
authored
Kas 30, 2007
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cleanups and documentation updates related to the removal of unbound methods.
üst
4e30a845
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
23 deletions
+8
-23
concrete.rst
Doc/c-api/concrete.rst
+8
-21
types.rst
Doc/library/types.rst
+0
-1
classobject.h
Include/classobject.h
+0
-1
No files found.
Doc/c-api/concrete.rst
Dosyayı görüntüle @
05a2fc22
...
...
@@ -2577,7 +2577,9 @@ Method Objects
.. index:: object: method
There are some useful functions that are useful for working with method objects.
Methods are bound function objects. Methods are always bound to an instance of
an user-defined class. Unbound methods (methods bound to a class object) are
no longer available.
.. cvar:: PyTypeObject PyMethod_Type
...
...
@@ -2594,25 +2596,11 @@ There are some useful functions that are useful for working with method objects.
parameter must not be *NULL*.
.. cfunction:: PyObject* PyMethod_New(PyObject *func, PyObject *self
, PyObject *class
)
.. cfunction:: PyObject* PyMethod_New(PyObject *func, PyObject *self)
Return a new method object, with *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, *self* should be the instance and *class* should be the
class of *self*, otherwise *self* should be *NULL* and *class* should be the
class which provides the unbound method.
.. XXX no unbound methods anymore...
.. cfunction:: PyObject* PyMethod_Class(PyObject *meth)
Return the class object from which the method *meth* was created; if this was
created from an instance, it will be the class of the instance.
.. cfunction:: PyObject* PyMethod_GET_CLASS(PyObject *meth)
Macro version of :cfunc:`PyMethod_Class` which avoids error checking.
Return a new method object, with *func* being any callable object and *self*
the instance the method should be bound. *func* is is the function that will
be called when the method is called. *self* must not be *NULL*.
.. cfunction:: PyObject* PyMethod_Function(PyObject *meth)
...
...
@@ -2627,8 +2615,7 @@ There are some useful functions that are useful for working with method objects.
.. cfunction:: PyObject* PyMethod_Self(PyObject *meth)
Return the instance associated with the method *meth* if it is bound, otherwise
return *NULL*.
Return the instance associated with the method *meth*.
.. cfunction:: PyObject* PyMethod_GET_SELF(PyObject *meth)
...
...
Doc/library/types.rst
Dosyayı görüntüle @
05a2fc22
...
...
@@ -58,7 +58,6 @@ The module defines the following names:
.. data:: MethodType
UnboundMethdType
The type of methods of user-defined class instances.
...
...
Include/classobject.h
Dosyayı görüntüle @
05a2fc22
...
...
@@ -23,7 +23,6 @@ PyAPI_FUNC(PyObject *) PyMethod_New(PyObject *, PyObject *);
PyAPI_FUNC
(
PyObject
*
)
PyMethod_Function
(
PyObject
*
);
PyAPI_FUNC
(
PyObject
*
)
PyMethod_Self
(
PyObject
*
);
PyAPI_FUNC
(
PyObject
*
)
PyMethod_Class
(
PyObject
*
);
/* Macros for direct access to these values. Type checks are *not*
done, so use with care. */
...
...
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