def translate_masks(modifiers):
 masks = []
 for i in modifiers:
  try:
   masks.append(xcbq.ModMasks[i])
  except KeyError:
   raise KeyError(('Unknown modifier: %s' % i))
 if masks:
  return reduce(operator.or_, masks)
 else:
  return 0

def translate_masks ( modifiers ) : masks = [ ] for i in modifiers : try : masks . append ( xcbq . ModMasks [ i ] ) except KeyError : raise KeyError ( ( 'Unknown modifier: %s' % i ) ) if masks : return reduce ( operator . or_ , masks ) else : return 0
translate a modifier mask specified as a list of strings into an or-ed bit representation .