def make_filter_tuple(doctype, key, value):
 if isinstance(value, (list, tuple)):
  return [doctype, key, value[0], value[1]]
 else:
  return [doctype, key, u'=', value]

def make_filter_tuple ( doctype , key , value ) : if isinstance ( value , ( list , tuple ) ) : return [ doctype , key , value [ 0 ] , value [ 1 ] ] else : return [ doctype , key , u'=' , value ]
return a filter tuple like [doctype .