#NEWLINE# def set( self , flash , request , response ) : #NEWLINE# #INDENT# 'Stores the given :class:`FlashScope` object in the session.\n        ' #NEWLINE# if hasattr ( request , 'session' ) : #NEWLINE# #INDENT# if flash : #NEWLINE# #INDENT# request . session [ self . _key ] = flash #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . _key in request . session ) : #NEWLINE# #INDENT# del request . session [ self . _key ]