def selections(self):
        "Yields (column, lookup, value) tuples"
        for key, value in self.pairs:
            if '__' in key:
                column, lookup = key.rsplit('__', 1)
            else:
                column = key
                lookup = 'exact'
            yield column, lookup, value
def selections ( self ) : for key , value in self . pairs : if '__' in key : column , lookup = key . rsplit ( '__' , 1 ) else : column = key lookup = 'exact' yield column , lookup , value
Yields (column, lookup, value) tuples