#NEWLINE# def qs_set( self , * args , **kwargs ) : #NEWLINE# #INDENT# 'Set values in QuerySet MultiDict' #NEWLINE# if ( args and kwargs ) : #NEWLINE# #INDENT# raise TypeError ( 'Use positional args or keyword args not both' ) #NEWLINE# #UNINDENT# query = self . query . copy ( ) #NEWLINE# if args : #NEWLINE# #INDENT# mdict = MultiDict ( args [ 0 ] ) #NEWLINE# for k in mdict . keys ( ) : #NEWLINE# #INDENT# if ( k in query ) : #NEWLINE# #INDENT# del query [ k ] #NEWLINE# #UNINDENT# #UNINDENT# for ( k , v ) in mdict . items ( ) : #NEWLINE# #INDENT# query . add ( k , v ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for ( k , v ) in kwargs . items ( ) : #NEWLINE# #INDENT# query [ k ] = v #NEWLINE# #UNINDENT# #UNINDENT# return self . _copy ( query = query )