from ctypes import * class S(Structure): _fields_ = [('x', c_int), ('y', c_int)] s = S(1, 2, x=3, y=4) # should complain