#NEWLINE# def set_many( self , mapping , expire = None ) : #NEWLINE# #INDENT# if ( not mapping ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( expire is None ) : #NEWLINE# #INDENT# expire = self . default_expire #NEWLINE# #UNINDENT# pipe = self . client . pipeline ( ) #NEWLINE# for ( key , value ) in mapping . iteritems ( ) : #NEWLINE# #INDENT# string = self . serializer . dumps ( value ) #NEWLINE# pipe . setex ( ( self . namespace + key ) , expire , string ) #NEWLINE# #UNINDENT# return all ( pipe . execute ( ) )