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 | 50a107a7b4690996ce672d497ba9993eca49aed6 (patch) | |
| tree | 24ec6c5594ba764ab20a3dda0a6e48e1c26095e6 /utils.py | |
| parent | c51e1d9ab88043fbfdfe99cd5ff76157915c42ef (diff) | |
| download | astroid-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.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', |
