#NEWLINE# def addAll( self , collection = [ ] ) : #NEWLINE# #INDENT# assert ( type ( collection ) == list ) #NEWLINE# with self . redis . pipeline ( ) as pipe : #NEWLINE# #INDENT# for element in collection : #NEWLINE# #INDENT# assert ( type ( element ) == tuple ) #NEWLINE# assert ( ( type ( element [ 1 ] ) == int ) or type ( ( element [ 1 ] == float ) ) ) #NEWLINE# try : #NEWLINE# #INDENT# pipe . zadd ( self . name , element [ 1 ] , self . _dumps ( element [ 0 ] ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# pipe . execute ( )