def read_struct(self, obj):
        self.read_struct_begin()
        while True:
            fname, ftype, fid = self.read_field_begin()
            if ftype == TType.STOP:
                break

            if fid not in obj.thrift_spec:
                self.skip(ftype)
                continue

            try:
                field = obj.thrift_spec[fid]
            except __HOLE__:
                self.skip(ftype)
                raise
            else:
                if field is not None and ftype == field[0]:
                    fname = field[1]
                    fspec = field[2]
                    val = self.read_val(ftype, fspec)
                    setattr(obj, fname, val)
                else:
                    self.skip(ftype)
            self.read_field_end()
        self.read_struct_end()
dataset/ETHPy150Open eleme/thriftpy/thriftpy/protocol/compact.py/TCompactProtocol.read_struct