Currently the method for defining Structure fields that cannot be defined within the class, is to define the class with pass and then set _fields_ outside. But ctypes.Structure incorrectly raises AttributeError, even when no class has ever set a _fields_.
ionite34
changed the title
ctypes._fields_ cannot be set when Structure has been subclassed
ctypes Stucture._fields_ cannot be set when Structure has been subclassed
Jan 12, 2023
Bug report
Currently the method for defining Structure fields that cannot be defined within the class, is to define the class with
passand then set_fields_outside. Butctypes.Structureincorrectly raisesAttributeError, even when no class has ever set a_fields_.Strangely, suppressing this Attribute error reveals the
_fields_attribute does actually get set?Your environment
The text was updated successfully, but these errors were encountered: