Skip to content

Commit f209726

Browse files
committed
Document PyType_SUPPORTS_WEAKREFS()
1 parent 7211a34 commit f209726

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/c-api/type.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,14 @@ Type Objects
327327
328328
.. versionadded:: 3.12
329329
330+
.. c:function:: int PyType_SUPPORTS_WEAKREFS(PyTypeObject *type)
331+
332+
Return true if instances of *type* supports creating weak references, false
333+
otherwise. This function always succeeds. *type* must not be ``NULL``.
334+
335+
.. seealso::
336+
* :ref:`weakrefobjects`
337+
* :py:mod:`weakref`
330338
331339
Creating Heap-Allocated Types
332340
.............................

0 commit comments

Comments
 (0)