class_docstr: Compact implementation of the Thrift protocol driver.
class_docstr_tok: ["Compact","implementation","of","the","Thrift","protocol","driver","."]
code: def readBool(self):
      if self.state == BOOL_READ:
          return self.__bool_value == CompactType.TRUE
      elif self.state == CONTAINER_READ:
          return self.__readByte() == CompactType.TRUE
      else:
          raise AssertionError(
              "Invalid state in compact protocol: %d" % self.state
          )
  
imports: from .TProtocol import TType, TProtocolBase, TProtocolException, TProtocolFactory, checkIntegerLimits
  from struct import pack, unpack
  from ..compat import binary_to_str, str_to_binary
label_desc: Use image node_id 39 for calling the TCompactProtocol obj's underlying member method code with example usage: obj.readBool() and returns: unknown, unknown