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