Bug report
Bug description:
When subclassing ctypes.c_uint64, if you use super() in any method definitions you get a TypeError upon defining the class similar to the following:
import ctypes
class MyClass(ctypes.c_uint64):
def f(self):
super()
TypeError: __class__ set to <class '__main__.MyClass'> defining 'MyClass' as <class '__main__.MyClass'>
This does not raise an error if subclassing other ctypes (e.g. c_uint8):
import ctypes
class MyClass(ctypes.c_uint8): # ok
def f(self):
super()
It's also ok to subclass c_uint64 if you don't use super:
import ctypes
class MyClass(ctypes.c_uint64): # ok
def f(self):
pass
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Bug report
Bug description:
When subclassing
ctypes.c_uint64, if you usesuper()in any method definitions you get aTypeErrorupon defining the class similar to the following:This does not raise an error if subclassing other ctypes (e.g.
c_uint8):It's also ok to subclass
c_uint64if you don't use super:CPython versions tested on:
3.13
Operating systems tested on:
macOS