#NEWLINE# def get_many( self , names ) : #NEWLINE# #INDENT# if ( not names ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if any ( ( ( '%' in name ) for name in names ) ) : #NEWLINE# #INDENT# raise ValueError ( 'get_many() is for fetching named variables, no % wildcards' ) #NEWLINE# #UNINDENT# with self . get_cursor ( ) as cursor : #NEWLINE# #INDENT# query = [ self . query , 'WHERE Variable_name IN (' ] #NEWLINE# query . extend ( ', ' . join ( ( '%s' for n in names ) ) ) #NEWLINE# query . append ( ')' ) #NEWLINE# cursor . execute ( ' ' . join ( query ) , names ) #NEWLINE# return { name : self . _cast ( value ) for ( name , value ) in cursor . fetchall ( ) }