code: def write_float(self, f):
          
          if type(f) is not float:
              raise TypeError('expected a float (got:%r)' % (type(f),))
  
          self.write(struct.pack("%sf" % self.endian, f))
docs: Writes a 4 byte float to the stream.
  
          @param f: 4 byte float
          @type f: C{float}
          @raise TypeError: Unexpected type for float C{f}.