diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-03 12:44:58 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-03 12:44:58 +0100 |
commit | 590733980d27814aa290312b3ba242781d6529d6 (patch) | |
tree | 8a98b6d4b1de9b3e5a550bf519ddfe88b27d2db9 /utils.py | |
parent | bd0b957f0e4b64024847dbc6d9b650d575ee8584 (diff) | |
download | astroid-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.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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', |