diff options
author | Paul McGuire <ptmcg@austin.rr.com> | 2015-10-24 21:02:20 +0000 |
---|---|---|
committer | Paul McGuire <ptmcg@austin.rr.com> | 2015-10-24 21:02:20 +0000 |
commit | 2130aa7ac8af828cf93fcf9412ea78de0ce9acea (patch) | |
tree | 695755c70e4592f3b3880e0cf4cd4604592f521e | |
parent | 8796e78be7d0320e71a9cb76d7fb1c70fe25bf90 (diff) | |
download | pyparsing-git-2130aa7ac8af828cf93fcf9412ea78de0ce9acea.tar.gz |
Enhanced docstring for new addCondition method.
-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):
|