class ctypes._SimpleCData
This non-public class is the base class of all fundamental ctypes data types. It is mentioned here because it contains the common attributes of the fundamental ctypes data types. _SimpleCData
is a subclass of _CData
, so it inherits their methods and attributes. ctypes data types that are not and do not contain pointers can now be pickled.
Instances have a single attribute:
-
value
-
This attribute contains the actual value of the instance. For integer and pointer types, it is an integer, for character types, it is a single character bytes object or string, for character pointer types it is a Python bytes object or string.
When the
value
attribute is retrieved from a ctypes instance, usually a new object is returned each time.ctypes
does not implement original object return, always a new object is constructed. The same is true for all other ctypes object instances.
Please login to continue.