diff options
author | ptmcg <ptmcg@austin.rr.com> | 2019-01-09 17:18:22 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2019-01-09 17:18:22 -0600 |
commit | d626c99b6288afc4708d72f668b45a29d3263d22 (patch) | |
tree | 4cbeca134437387022e59b71631246e178393aca /examples/wordsToNum.py | |
parent | e9ef507bf1fd41d4bd3ffb0c193e5889254ba340 (diff) | |
download | pyparsing-git-d626c99b6288afc4708d72f668b45a29d3263d22.tar.gz |
Add enumerated place holders for strings that invoke str.format(), for Py2 compatibility
Diffstat (limited to 'examples/wordsToNum.py')
-rw-r--r-- | examples/wordsToNum.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/wordsToNum.py b/examples/wordsToNum.py index 3d5c4b7..cbd3d26 100644 --- a/examples/wordsToNum.py +++ b/examples/wordsToNum.py @@ -85,9 +85,9 @@ def test(s,expected): if not fail_expected:
teststr, results = results_tup[0]
observed = results[0]
- assert expected == observed, "incorrect parsed value, {} -> {}, should be {}".format(teststr, observed, expected)
+ assert expected == observed, "incorrect parsed value, {0} -> {1}, should be {2}".format(teststr, observed, expected)
except Exception as exc:
- print("{}: {}".format(type(exc).__name__, exc))
+ print("{0}: {1}".format(type(exc).__name__, exc))
test("one hundred twenty hundred", None)
test("one hundred and twennty", None)
|