From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/python~3.12/c-api%2Fmethod.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 devdocs/python~3.12/c-api%2Fmethod.html (limited to 'devdocs/python~3.12/c-api%2Fmethod.html') diff --git a/devdocs/python~3.12/c-api%2Fmethod.html b/devdocs/python~3.12/c-api%2Fmethod.html new file mode 100644 index 00000000..492a7ca1 --- /dev/null +++ b/devdocs/python~3.12/c-api%2Fmethod.html @@ -0,0 +1,21 @@ +

Instance Method Objects

An instance method is a wrapper for a PyCFunction and the new way to bind a PyCFunction to a class object. It replaces the former call PyMethod_New(func, NULL, class).

+PyTypeObject PyInstanceMethod_Type
+

This instance of PyTypeObject represents the Python instance method type. It is not exposed to Python programs.

+
+int PyInstanceMethod_Check(PyObject *o)
+

Return true if o is an instance method object (has type PyInstanceMethod_Type). The parameter must not be NULL. This function always succeeds.

+
+PyObject *PyInstanceMethod_New(PyObject *func)
+Return value: New reference.

Return a new instance method object, with func being any callable object. func is the function that will be called when the instance method is called.

+
+PyObject *PyInstanceMethod_Function(PyObject *im)
+Return value: Borrowed reference.

Return the function object associated with the instance method im.

+
+PyObject *PyInstanceMethod_GET_FUNCTION(PyObject *im)
+Return value: Borrowed reference.

Macro version of PyInstanceMethod_Function() which avoids error checking.

+
+

+ © 2001–2023 Python Software Foundation
Licensed under the PSF License.
+ https://docs.python.org/3.12/c-api/method.html +

+
-- cgit v1.2.3