https://github.com/python/cpython/commit/4e3d5ecaad295c0b766019409c7e762497fd1d7d
commit: 4e3d5ecaad295c0b766019409c7e762497fd1d7d
branch: main
author: Peter Bierma <[email protected]>
committer: ZeroIntensity <[email protected]>
date: 2026-10-19T22:29:35Z
summary:

gh-158418: Document that zero-arg `super` doesn't work with 
`ctypes.util.struct` (GH-159803)

files:
M Doc/library/ctypes.rst

diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 6635304c35face..bafe00a6a95703 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -3675,6 +3675,12 @@ fields, or any other data types containing pointer type 
fields.
 
       point = Point(1, 2)
 
+   .. note::
+
+      Calling :func:`super` without arguments in methods of the decorated
+      class raises a :exc:`TypeError`. Use the two-argument form instead, for 
example
+      ``super(Point, self).__init__(x, y)``.
+
    *align*, *layout*, and *pack* supply the value for the 
:attr:`~ctypes.Structure._align_`,
    :attr:`~ctypes.Structure._layout_`, and :attr:`~ctypes.Structure._pack_`
    attributes, respectively.

_______________________________________________
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