(self)
Destructor.  Calls close().
Destructor.  Calls close().
Destructor . Calls close () .
def __del__(self):
        """Destructor.  Calls close()."""
        try:
            closed = self.closed
        except AttributeError:
            # If getting closed fails, then the object is probably
            # in an unusable state, so ignore.
            return

        if closed:
            return

        if _IOBASE_EMITS_UNRAISABLE:
            self.close()
        else:
            # The try/except block is in case this is called at program
            # exit time, when it's possible that globals have already been
            # deleted, and then the close() call might fail.  Since
            # there's nothing we can do about such failures and they annoy
            # the end users, we suppress the traceback.
            try:
                self.close()
            except:
                pass
def __del__ ( self ) : try : closed = self . closed except AttributeError : # If getting closed fails, then the object is probably # in an unusable state, so ignore. return if closed : return if _IOBASE_EMITS_UNRAISABLE : self . close ( ) else : # The try/except block is in case this is called at program # exit time, when it's possible that globals have already been # deleted, and then the close() call might fail.  Since # there's nothing we can do about such failures and they annoy # the end users, we suppress the traceback. try : self . close ( ) except : pass