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/protobuf_parser.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/protobuf_parser.py')
-rw-r--r-- | examples/protobuf_parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/protobuf_parser.py b/examples/protobuf_parser.py index ad5db3a..68a8f63 100644 --- a/examples/protobuf_parser.py +++ b/examples/protobuf_parser.py @@ -17,7 +17,7 @@ LBRACE,RBRACE,LBRACK,RBRACK,LPAR,RPAR,EQ,SEMI = map(Suppress,"{}[]()=;") kwds = """message required optional repeated enum extensions extends extend
to package service rpc returns true false option import"""
for kw in kwds.split():
- exec("{}_ = Keyword('{}')".format(kw.upper(), kw))
+ exec("{0}_ = Keyword('{1}')".format(kw.upper(), kw))
messageBody = Forward()
|