def is_short_syllable(w, before=None):
 if (before != None):
  i = (((before < 0) and (len(w) + before)) or before)
  return is_short_syllable(w[max(0, (i - 3)):i])
 if ((len(w) == 3) and is_consonant(w[0]) and is_vowel(w[1]) and is_consonant(w[2]) and (w[2] not in 'wxY')):
  return True
 if ((len(w) == 2) and is_vowel(w[0]) and is_consonant(w[1])):
  return True
 return False

def is_short_syllable ( w , before = None ) : if ( before != None ) : i = ( ( ( before < 0 ) and ( len ( w ) + before ) ) or before ) return is_short_syllable ( w [ max ( 0 , ( i - 3 ) ) : i ] ) if ( ( len ( w ) == 3 ) and is_consonant ( w [ 0 ] ) and is_vowel ( w [ 1 ] ) and is_consonant ( w [ 2 ] ) and ( w [ 2 ] not in 'wxY' ) ) : return True if ( ( len ( w ) == 2 ) and is_vowel ( w [ 0 ] ) and is_consonant ( w [ 1 ] ) ) : return True return False
a short syllable in a word is either: - a vowel followed by a non-vowel other than w .