#NEWLINE# def session_pop( self , request , key , default ) : #NEWLINE# #INDENT# ' Return the value of a session key if exists and pop it; otherwise return default\n        :param request: request object\n        :param key: the session key to pop if exists\n        :param default: a default value if key not exists\n        :return: session key or default value\n        ' #NEWLINE# return ( request . session . pop ( key ) if ( key in request . session ) else default )