summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2015-10-24 21:02:20 +0000
committerPaul McGuire <ptmcg@austin.rr.com>2015-10-24 21:02:20 +0000
commit2130aa7ac8af828cf93fcf9412ea78de0ce9acea (patch)
tree695755c70e4592f3b3880e0cf4cd4604592f521e
parent8796e78be7d0320e71a9cb76d7fb1c70fe25bf90 (diff)
downloadpyparsing-git-2130aa7ac8af828cf93fcf9412ea78de0ce9acea.tar.gz
Enhanced docstring for new addCondition method.
-rw-r--r--src/pyparsing.py4
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):