summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2009-03-03 12:44:58 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2009-03-03 12:44:58 +0100
commit590733980d27814aa290312b3ba242781d6529d6 (patch)
tree8a98b6d4b1de9b3e5a550bf519ddfe88b27d2db9 /utils.py
parentbd0b957f0e4b64024847dbc6d9b650d575ee8584 (diff)
downloadastroid-git-590733980d27814aa290312b3ba242781d6529d6.tar.gz
* GenExprFor, ListCompFor -> Comprehension
* no more need for loop_node methode on For/Comprehension (they both have .iter attribute) * no more need for COMPREHENSION_SCOPES (Comprehension is enough) * move common inference methods from _inference_compiler to inference --HG-- branch : _ast_compat
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 0dcc2bb1..49c3f7c6 100644
--- a/utils.py
+++ b/utils.py
@@ -162,7 +162,7 @@ class ASTVisitor(object):
def visit_listcomp(self, node):
"""dummy method for visiting an ListComp node"""
- def visit_listcompfor(self, node):
+ def visit_comprehension(self, node):
"""dummy method for visiting an ListCompFor node"""
def visit_module(self, node):
@@ -219,7 +219,8 @@ REDIRECT = {
'Attribute': 'Getattr',
'Call': 'CallFunc',
'ClassDef': 'Class',
- 'comprehension': "ListCompFor",
+ "ListCompFor": 'Comprehension',
+ "GenExprFor": 'Comprehension',
'excepthandler': 'ExceptHandler',
'Expr': 'Discard',
'FunctionDef': 'Function',