fridge.py
def close(self):
        """
        Close the fridge.
        Calls :meth:`save` and closes the underlying file object unless
        an already open file was passed to the constructor.
        This method has no effect if the object is already closed.

        After the fridge is closed :meth:`save` and :meth:`load` will raise an exception
        but you will still be able to use it as an ordinary dictionary.
        """
        if not self.closed:
            self.save()
            if self.close_file:
                self.file.close()
        self.closed = True
def close(self):
        """
        Close the fridge.
        Calls :meth:`save` and closes the underlying file object unless
        an already open file was passed to the constructor.
        This method has no effect if the object is already closed.

        After the fridge is closed :meth:`save` and :meth:`load` will raise an exception
        but you will still be able to use it as an ordinary dictionary.
        """
        if not self.closed:
            self.save()
            if self.close_file:
                self.file.close()
        self.closed = True
def close ( self ) : if not self . closed : self . save ( ) if self . close_file : self . file . close ( ) self . closed = True
Close the fridge.
        Calls :meth:`save` and closes the underlying file object unless
        an already open file was passed to the constructor.
        This method has no effect if the object is already closed.

        After the fridge is closed :meth:`save` and :meth:`load` will raise an exception
        but you will still be able to use it as an ordinary dictionary.
Close the fridge . Calls : meth : save and closes the underlying file object unless an already open file was passed to the constructor . This method has no effect if the object is already closed .