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
commit50a107a7b4690996ce672d497ba9993eca49aed6 (patch)
tree24ec6c5594ba764ab20a3dda0a6e48e1c26095e6 /utils.py
parentc51e1d9ab88043fbfdfe99cd5ff76157915c42ef (diff)
downloadastroid-50a107a7b4690996ce672d497ba9993eca49aed6.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
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 0dcc2bb..49c3f7c 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',