def parse_constraint(source, constraints, ch):
 if (ch not in 'deis'):
  raise ParseError()
 if (ch in constraints):
  raise ParseError()
 return ch

def parse_constraint ( source , constraints , ch ) : if ( ch not in 'deis' ) : raise ParseError ( ) if ( ch in constraints ) : raise ParseError ( ) return ch
parses a constraint .