(self)
Flush the file and close it.

        A closed file cannot be written any more. Calling
        :meth:`close` more than once is allowed.
Flush the file and close it.
Flush the file and close it .
def close(self):
        """Flush the file and close it.

        A closed file cannot be written any more. Calling
        :meth:`close` more than once is allowed.
        """
        if not self._closed:
            self.__flush()
            object.__setattr__(self, "_closed", True)
def close ( self ) : if not self . _closed : self . __flush ( ) object . __setattr__ ( self , "_closed" , True )