summaryrefslogtreecommitdiff
path: root/examples/rangeCheck.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2019-01-09 17:18:22 -0600
committerptmcg <ptmcg@austin.rr.com>2019-01-09 17:18:22 -0600
commitd626c99b6288afc4708d72f668b45a29d3263d22 (patch)
tree4cbeca134437387022e59b71631246e178393aca /examples/rangeCheck.py
parente9ef507bf1fd41d4bd3ffb0c193e5889254ba340 (diff)
downloadpyparsing-git-d626c99b6288afc4708d72f668b45a29d3263d22.tar.gz
Add enumerated place holders for strings that invoke str.format(), for Py2 compatibility
Diffstat (limited to 'examples/rangeCheck.py')
-rw-r--r--examples/rangeCheck.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rangeCheck.py b/examples/rangeCheck.py
index 66af545..29e9459 100644
--- a/examples/rangeCheck.py
+++ b/examples/rangeCheck.py
@@ -26,7 +26,7 @@ def ranged_value(expr, minval=None, maxval=None):
outOfRangeMessage = {
(True, False) : "value is greater than %s" % maxval,
(False, True) : "value is less than %s" % minval,
- (False, False) : "value is not in the range ({} to {})".format(minval,maxval),
+ (False, False) : "value is not in the range ({0} to {1})".format(minval,maxval),
}[minval is None, maxval is None]
return expr().addCondition(inRangeCondition, message=outOfRangeMessage)