https://github.com/python/cpython/commit/811fd8f4a4f9d1f071dd84e653d37628d46bf91b
commit: 811fd8f4a4f9d1f071dd84e653d37628d46bf91b
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: ZeroIntensity <[email protected]>
date: 2025-11-09T18:09:43Z
summary:

[3.13] gh-141004: Document `PyClassMethod*` and `PyStaticMethod*` APIs 
(GH-141296) (GH-141309)

gh-141004: Document `PyClassMethod*` and `PyStaticMethod*` APIs (GH-141296)
(cherry picked from commit 807db68ddd8572cfa825373bc13461b02691f4d9)

Co-authored-by: Peter Bierma <[email protected]>

files:
M Doc/c-api/descriptor.rst

diff --git a/Doc/c-api/descriptor.rst b/Doc/c-api/descriptor.rst
index ff0df575279d96..9a4093a7708a7c 100644
--- a/Doc/c-api/descriptor.rst
+++ b/Doc/c-api/descriptor.rst
@@ -38,3 +38,39 @@ found in the dictionary of type objects.
 
 
 .. c:function:: PyObject* PyWrapper_New(PyObject *, PyObject *)
+
+
+Built-in descriptors
+^^^^^^^^^^^^^^^^^^^^
+
+.. c:var:: PyTypeObject PyClassMethod_Type
+
+   The type of class method objects. This is the same object as
+   :class:`classmethod` in the Python layer.
+
+
+.. c:function:: PyObject *PyClassMethod_New(PyObject *callable)
+
+   Create a new :class:`classmethod` object wrapping *callable*.
+   *callable* must be a callable object and must not be ``NULL``.
+
+   On success, this function returns a :term:`strong reference` to a new class
+   method descriptor. On failure, this function returns ``NULL`` with an
+   exception set.
+
+
+.. c:var:: PyTypeObject PyStaticMethod_Type
+
+   The type of static method objects. This is the same object as
+   :class:`staticmethod` in the Python layer.
+
+
+.. c:function:: PyObject *PyStaticMethod_New(PyObject *callable)
+
+   Create a new :class:`staticmethod` object wrapping *callable*.
+   *callable* must be a callable object and must not be ``NULL``.
+
+   On success, this function returns a :term:`strong reference` to a new static
+   method descriptor. On failure, this function returns ``NULL`` with an
+   exception set.
+

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to