def fileno(self):
        """Forces this buffer to use a temporary file as the underlying.
        object and returns the fileno associated with it.
        """
        if isinstance(self._delegate, self._strategies[0]):
            new_delegate = self._strategies[1]()
            new_delegate.write(self.getvalue())
            self._delegate = new_delegate
        return self._delegate.fileno()
Forces this buffer to use a temporary file as the underlying.
        object and returns the fileno associated with it.
        
recipes/Python/496744_Improved_TemporaryFile/recipe-496744.py