def get_plural_num_pos(match):
 plural_str = match.group(0).strip()
 if (plural_str not in _PLURAL_NUM_POS):
  first_arg_num = _check_plural_arg_is_num(match.group(2).strip())
  second_arg_num = _check_plural_arg_is_num(match.group(3).strip())
  if (first_arg_num == second_arg_num):
   first_arg_num = second_arg_num = None
  pos = None
  if ((first_arg_num is False) or (second_arg_num is True)):
   pos = 2
  elif ((second_arg_num is False) or (first_arg_num is True)):
   pos = 1
  else:
   pos = prompt_user(('Ambiguous: %s which is the number? ([1] 2) ' % plural_str), default=1)
  _PLURAL_NUM_POS[plural_str] = int(pos)
 return _PLURAL_NUM_POS[plural_str]

def get_plural_num_pos ( match ) : plural_str = match . group ( 0 ) . strip ( ) if ( plural_str not in _PLURAL_NUM_POS ) : first_arg_num = _check_plural_arg_is_num ( match . group ( 2 ) . strip ( ) ) second_arg_num = _check_plural_arg_is_num ( match . group ( 3 ) . strip ( ) ) if ( first_arg_num == second_arg_num ) : first_arg_num = second_arg_num = None pos = None if ( ( first_arg_num is False ) or ( second_arg_num is True ) ) : pos = 2 elif ( ( second_arg_num is False ) or ( first_arg_num is True ) ) : pos = 1 else : pos = prompt_user ( ( 'Ambiguous: %s which is the number? ([1] 2) ' % plural_str ) , default = 1 ) _PLURAL_NUM_POS [ plural_str ] = int ( pos ) return _PLURAL_NUM_POS [ plural_str ]
prompt to user for help in determining which argument to plural() is the one that holds the number .