(self)
Flush written text to both stdout and a file, if open.
Flush written text to both stdout and a file, if open.
Flush written text to both stdout and a file if open .
def flush(self) -> None:
        """Flush written text to both stdout and a file, if open."""
        if self.file is not None:
            self.file.flush()

        self.stdout.flush()
def flush ( self ) -> None : if self . file is not None : self . file . flush ( ) self . stdout . flush ( )