

def read(self, iprot):
    if ((iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated) and isinstance(iprot.trans, TTransport.CReadableTransport) and (self.thrift_spec is not None) and (fastbinary is not None)):
        fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
        return
    iprot.readStructBegin()
    while True:
        (fname, ftype, fid) = iprot.readFieldBegin()
        if (ftype == TType.STOP):
            break
        if (fid == 1):
            if (ftype == TType.I32):
                self.what = iprot.readI32()
            else:
                iprot.skip(ftype)
        elif (fid == 2):
            if (ftype == TType.STRING):
                self.why = iprot.readString()
            else:
                iprot.skip(ftype)
        else:
            self.skip(ftype)
        iprot.readFieldEnd()
    iprot.readStructEnd()

dataset/ETHPy150Open amuraru/thrift-connection-pool/examples/gen-py/tutorial/ttypes.py InvalidOperation.read/VarMisuse@209/243 `iprot`->`self`