Skip to content

Commit 4e3d5ec

Browse files
gh-158418: Document that zero-arg super doesn't work with ctypes.util.struct (GH-159803)
1 parent 3f09229 commit 4e3d5ec

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎Doc/library/ctypes.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,12 @@ fields, or any other data types containing pointer type fields.
36753675
36763676
point = Point(1, 2)
36773677
3678+
.. note::
3679+
3680+
Calling :func:`super` without arguments in methods of the decorated
3681+
class raises a :exc:`TypeError`. Use the two-argument form instead, for example
3682+
``super(Point, self).__init__(x, y)``.
3683+
36783684
*align*, *layout*, and *pack* supply the value for the :attr:`~ctypes.Structure._align_`,
36793685
:attr:`~ctypes.Structure._layout_`, and :attr:`~ctypes.Structure._pack_`
36803686
attributes, respectively.

0 commit comments

Comments
 (0)