def read(cls, byte_object): a = cls(byte_object) # print(byte_object) ctypes.memmove(ctypes.addressof(a.data), bytes(byte_object), min(len(byte_object), ctypes.sizeof(a.data))) return a