NT dictcomp -> dict_comp to match AST

This commit is contained in:
rocky
2017-11-30 08:50:00 -05:00
parent 0b284f8230
commit ac4d4d1da9
7 changed files with 20 additions and 19 deletions

View File

@@ -1157,7 +1157,7 @@ class SourceWalker(GenericASTTraversal, object):
self.prec = 27
# FIXME: clean this up
if self.version > 3.0 and node == 'dictcomp':
if self.version > 3.0 and node == 'dict_comp':
cn = node[1]
elif self.version < 2.7 and node == 'generator_exp':
if node[0] == 'LOAD_GENEXPR':
@@ -1375,7 +1375,7 @@ class SourceWalker(GenericASTTraversal, object):
self.write(']')
self.prune()
n_dictcomp = n_set_comp
n_dict_comp = n_set_comp
def setcomprehension_walk3(self, node, collection_index):
"""List comprehensions the way they are done in Python3.