diff options
-rw-r--r-- | src/pyparsing.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pyparsing.py b/src/pyparsing.py index 303d4db..6a64487 100644 --- a/src/pyparsing.py +++ b/src/pyparsing.py @@ -910,7 +910,9 @@ class ParserElement(object): return self
def addCondition(self, *fns, **kwargs):
- """Add a boolean predicate function to expression's list of parse actions. See L{I{setParseAction}<setParseAction>}."""
+ """Add a boolean predicate function to expression's list of parse actions. See
+ L{I{setParseAction}<setParseAction>}. Optional keyword argument C{message} can
+ be used to define a custom message to be used in the raised exception."""
msg = kwargs.get("message") or "failed user-defined condition"
for fn in fns:
def pa(s,l,t):
|