@@ -2577,7 +2577,9 @@ Method Objects
25772577
25782578.. index :: object: method
25792579
2580- There are some useful functions that are useful for working with method objects.
2580+ Methods are bound function objects. Methods are always bound to an instance of
2581+ an user-defined class. Unbound methods (methods bound to a class object) are
2582+ no longer available.
25812583
25822584
25832585.. cvar :: PyTypeObject PyMethod_Type
@@ -2594,25 +2596,11 @@ There are some useful functions that are useful for working with method objects.
25942596 parameter must not be *NULL *.
25952597
25962598
2597- .. cfunction :: PyObject* PyMethod_New(PyObject *func, PyObject *self, PyObject *class )
2599+ .. cfunction :: PyObject* PyMethod_New(PyObject *func, PyObject *self)
25982600
2599- Return a new method object, with *func * being any callable object; this is the
2600- function that will be called when the method is called. If this method should
2601- be bound to an instance, *self * should be the instance and *class * should be the
2602- class of *self *, otherwise *self * should be *NULL * and *class * should be the
2603- class which provides the unbound method.
2604-
2605- .. XXX no unbound methods anymore...
2606-
2607- .. cfunction :: PyObject* PyMethod_Class(PyObject *meth)
2608-
2609- Return the class object from which the method *meth * was created; if this was
2610- created from an instance, it will be the class of the instance.
2611-
2612-
2613- .. cfunction :: PyObject* PyMethod_GET_CLASS(PyObject *meth)
2614-
2615- Macro version of :cfunc: `PyMethod_Class ` which avoids error checking.
2601+ Return a new method object, with *func * being any callable object and *self *
2602+ the instance the method should be bound. *func * is is the function that will
2603+ be called when the method is called. *self * must not be *NULL *.
26162604
26172605
26182606.. cfunction :: PyObject* PyMethod_Function(PyObject *meth)
@@ -2627,8 +2615,7 @@ There are some useful functions that are useful for working with method objects.
26272615
26282616.. cfunction :: PyObject* PyMethod_Self(PyObject *meth)
26292617
2630- Return the instance associated with the method *meth * if it is bound, otherwise
2631- return *NULL *.
2618+ Return the instance associated with the method *meth *.
26322619
26332620
26342621.. cfunction :: PyObject* PyMethod_GET_SELF(PyObject *meth)
0 commit comments