mpl.mathtext.Group.addCondition

Group.addCondition(*fns, **kwargs)

Add a boolean predicate function to expression’s list of parse actions. See L{I{setParseAction}<setParseAction>} for function call signatures. Unlike C{setParseAction}, functions passed to C{addCondition} need to return boolean success/fail of the condition.

Optional keyword arguments:
  • message = define a custom message to be used in the raised exception
  • fatal = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException