#NEWLINE# def _get_by_sid( self , sid ) : #NEWLINE# #INDENT# 'Returns a session given a session id.' #NEWLINE# if self . _is_valid_sid ( sid ) : #NEWLINE# #INDENT# data = memcache . get ( sid ) #NEWLINE# if ( data is not None ) : #NEWLINE# #INDENT# self . sid = self #NEWLINE# return sessions . SessionDict ( self , data = data ) #NEWLINE# #UNINDENT# #UNINDENT# self . sid = self . _get_new_sid ( ) #NEWLINE# return sessions . SessionDict ( self , new = True )