(self)
return unpack("B", self.fo.read(1))[0] != 0
A boolean is written as a single byte whose value is either 0
        (false) or 1 (true).
A boolean is written as a single byte whose value is either 0
        (false) or 1 (true).
A boolean is written as a single byte whose value is either 0 ( false ) or 1 ( true ) .
def read_boolean(self):
        """A boolean is written as a single byte whose value is either 0
        (false) or 1 (true).
        """

        # technically 0x01 == true and 0x00 == false, but many languages will
        # cast anything other than 0 to True and only 0 to False
        return unpack("B", self.fo.read(1))[0] != 0
def read_boolean ( self ) : # technically 0x01 == true and 0x00 == false, but many languages will # cast anything other than 0 to True and only 0 to False return unpack ( "B" , self . fo . read ( 1 ) ) [ 0 ] != 0