def ungroup(expr):
 return TokenConverter(expr).setParseAction((lambda t: t[0]))

def ungroup ( expr ) : return TokenConverter ( expr ) . setParseAction ( ( lambda t : t [ 0 ] ) )
helper to undo pyparsings default grouping of and expressions .