diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-02-13 15:16:07 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-02-13 15:18:03 +0100 |
commit | 5709327cb451d29c529b0a6b4ce83288530c8769 (patch) | |
tree | b9d236bf892418194357c84555337a07bdbf084a | |
parent | 9707260d8a8f25665b1658d373340c87e52d5e4f (diff) | |
download | rnc2rng-5709327cb451d29c529b0a6b4ce83288530c8769.tar.gz rnc2rng-5709327cb451d29c529b0a6b4ce83288530c8769.tar.xz rnc2rng-5709327cb451d29c529b0a6b4ce83288530c8769.zip |
rnctree.py: Python 2.6 compatibility (no dict comprehension)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rwxr-xr-x | rnctree.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -59,7 +59,7 @@ for t in tokens + quant_tokens_aux + parse_constructs: keyword_list = keywords.values() -PAIRS = {r[0]: tuple(r[1:]) for r in pair_rules} +PAIRS = dict((r[0], tuple(r[1:])) for r in pair_rules) TAGS = { ONE: 'group', @@ -458,8 +458,8 @@ def _nest_annotations(nodes, mapping, delim=None): if not isinstance(n.value, str): # no recurse to terminal str if n.type in (ELEM, ATTR): - mapping_rec = {n: [] for n in - (ANNOTATION, NS_ANNOTATION, COMMENT)} + mapping_rec = dict((n, []) for n in + (ANNOTATION, NS_ANNOTATION, COMMENT)) else: mapping_rec = mapping _nest_annotations(n.value, mapping_rec) |