parameters: (self, line)
docstring: line is always bytes, not string
docstring_summary: line is always bytes, not string
docstring_tokens: line is always bytes not string
function: def __write(self, line):
          """line is always bytes, not string"""
          if self.__file is not None:
              if self.__file.tell() + len(line) > 1000:
                  self.file = self.make_file()
                  data = self.__file.getvalue()
                  self.file.write(data)
                  self.__file = None
          if self._binary_file:
              # keep bytes
              self.file.write(line)
          else:
              # decode to string
              self.file.write(line.decode(self.encoding, self.errors))
function_tokens: def __write ( self , line ) : if self . __file is not None : if self . __file . tell ( ) + len ( line ) > 1000 : self . file = self . make_file ( ) data = self . __file . getvalue ( ) self . file . write ( data ) self . __file = None if self . _binary_file : # keep bytes self . file . write ( line ) else : # decode to string self . file . write ( line . decode ( self . encoding , self . errors ) )