Skip to content

Commit 6b1839f

Browse files
committed
Add clarification for the callable argument.
1 parent e73bb24 commit 6b1839f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/c-api/descriptor.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Built-in descriptors
5252
.. c:function:: PyObject *PyClassMethod_New(PyObject *callable)
5353
5454
Create a new :class:`classmethod` object wrapping *callable*.
55+
*callable* must be a callable object and must not be ``NULL``.
5556
5657
On success, this function returns a :term:`strong reference` to a new class
5758
method descriptor. On failure, this function returns ``NULL`` with an
@@ -67,6 +68,7 @@ Built-in descriptors
6768
.. c:function:: PyObject *PyStaticMethod_New(PyObject *callable)
6869
6970
Create a new :class:`staticmethod` object wrapping *callable*.
71+
*callable* must be a callable object and must not be ``NULL``.
7072
7173
On success, this function returns a :term:`strong reference` to a new static
7274
method descriptor. On failure, this function returns ``NULL`` with an

0 commit comments

Comments
 (0)