summaryrefslogtreecommitdiff
path: root/src/examples/parsePythonValue.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2012-11-23 08:54:10 +0000
committerPaul McGuire <ptmcg@austin.rr.com>2012-11-23 08:54:10 +0000
commit774e46526945ea91265734a2dc82d15eed515577 (patch)
tree734ae210c20a98f01fe029f7e6eeb7a93b4617fb /src/examples/parsePythonValue.py
parent6b12041d4656f4cda910f24acda8d71013166fbd (diff)
downloadpyparsing-git-774e46526945ea91265734a2dc82d15eed515577.tar.gz
Clean up examples to be Python 3 compatible
Diffstat (limited to 'src/examples/parsePythonValue.py')
-rw-r--r--src/examples/parsePythonValue.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/examples/parsePythonValue.py b/src/examples/parsePythonValue.py
index d9671fa..bc17aed 100644
--- a/src/examples/parsePythonValue.py
+++ b/src/examples/parsePythonValue.py
@@ -56,12 +56,12 @@ tests = """['a', 100, ('A', [101,102]), 3.14, [ +2.718, 'xyzzy', -1.414] ]
'a quoted string'""".split("\n")
for test in tests:
- print "Test:", test.strip()
+ print("Test:", test.strip())
result = listItem.parseString(test)[0]
- print "Result:", result
+ print("Result:", result)
try:
for dd in result:
- if isinstance(dd,dict): print dd.items()
- except TypeError,te:
+ if isinstance(dd,dict): print(list(dd.items()))
+ except TypeError as te:
pass
- print
+ print()