summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2020-05-31 12:16:53 -0500
committerptmcg <ptmcg@austin.rr.com>2020-05-31 12:16:53 -0500
commit6f1b33cc7b9719c28178acf749f791d987484fe6 (patch)
tree85679a23a491fe9e2a8e82afb77c6652ab126c4c
parent0561ff9599a3a0c2b8b00ca7be53b741bdabad6c (diff)
downloadpyparsing-git-6f1b33cc7b9719c28178acf749f791d987484fe6.tar.gz
Expand description of ParseException.explain() and explain_exception()
-rw-r--r--CHANGES11
1 files changed, 9 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 21a2722..feac25b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -14,8 +14,15 @@ API change summary:
if given results names.
. ParseException.explain is now an instance method of
- ParseException. To run explain against other exceptions,
- use ParseException.explain_exception.
+ ParseException.
+
+ try:
+ expr.parseString("...")
+ except ParseException as pe:
+ print(pe.explain())
+
+ To run explain against other exceptions, use
+ ParseException.explain_exception.
. ZeroOrMore expressions that have results names will now
include empty lists for their name if no matches are found.