Skip to content

Commit af9d4ab

Browse files
committed
Document PyClassMethod* and PyStaticMethod*
1 parent dbe4090 commit af9d4ab

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Doc/c-api/descriptor.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,38 @@ found in the dictionary of type objects.
3838
3939
4040
.. c:function:: PyObject* PyWrapper_New(PyObject *, PyObject *)
41+
42+
43+
Built-in descriptors
44+
^^^^^^^^^^^^^^^^^^^^
45+
46+
47+
.. c:var:: PyTypeObject PyClassMethod_Type
48+
49+
The type of class method objects. This is the same object as
50+
:class:`classmethod` in the Python layer.
51+
52+
53+
.. c:function:: PyObject *PyClassMethod_New(PyObject *callable)
54+
55+
Create a new :class:`classmethod` object wrapping *callable*.
56+
57+
On success, this function returns a :term:`strong reference` to a new class
58+
method descriptor. On failure, this function returns ``NULL`` with an
59+
exception set.
60+
61+
62+
.. c:var:: PyTypeObject PyStaticMethod_Type
63+
64+
The type of static method objects. This is the same object as
65+
:class:`staticmethod` in the Python layer.
66+
67+
68+
.. c:function:: PyObject *PyStaticMethod_New(PyObject *callable)
69+
70+
Create a new :class:`staticmethod` object wrapping *callable*.
71+
72+
On success, this function returns a :term:`strong reference` to a new static
73+
method descriptor. On failure, this function returns ``NULL`` with an
74+
exception set.
75+

0 commit comments

Comments
 (0)