summaryrefslogtreecommitdiff
path: root/src/examples/lucene_grammar.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/lucene_grammar.py')
-rw-r--r--src/examples/lucene_grammar.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/examples/lucene_grammar.py b/src/examples/lucene_grammar.py
index 27c7aeb..c098cce 100644
--- a/src/examples/lucene_grammar.py
+++ b/src/examples/lucene_grammar.py
@@ -316,15 +316,15 @@ failtests = r"""
""".splitlines()
allpass = True
-for t in filter(None,map(str.strip,tests)):
- print t
+for t in [_f for _f in map(str.strip,tests) if _f]:
+ print(t)
try:
#~ expression.parseString(t,parseAll=True)
- print expression.parseString(t,parseAll=True)
- except ParseException, pe:
- print t
- print pe
+ print(expression.parseString(t,parseAll=True))
+ except ParseException as pe:
+ print(t)
+ print(pe)
allpass = False
- print
+ print()
-print ("OK", "FAIL")[not allpass]
+print(("OK", "FAIL")[not allpass])