Anonymous avatar Anonymous committed 537b685

evaluate: renamed get_primary_and_result() to eval_node2

Comments (0)

Files changed (2)

rope/base/evaluate.py

 
     Return `None` if the expression cannot be evaluated.
     """
-    return get_primary_and_result(scope, node)[1]
+    return eval_node2(scope, node)[1]
 
 
-def get_primary_and_result(scope, node):
+def eval_node2(scope, node):
     evaluator = StatementEvaluator(scope)
     ast.walk(node, evaluator)
     return evaluator.old_result, evaluator.result
         node = ast.parse('(%s)' % name)
     except SyntaxError:
         raise BadIdentifierError('Not a resolvable python identifier selected.')
-    return get_primary_and_result(holding_scope, node)
+    return eval_node2(holding_scope, node)
 
 
 class ScopeNameFinder(object):
         return pyobject
 
     def _get_primary_and_object_for_node(self, stmt):
-        primary, pyname = get_primary_and_result(self.scope, stmt)
+        primary, pyname = eval_node2(self.scope, stmt)
         pyobject = None
         if pyname is not None:
             pyobject = pyname.get_object()

rope/base/oi/soa.py

     def _Call(self, node):
         for child in rope.base.ast.get_child_nodes(node):
             rope.base.ast.walk(child, self)
-        primary, pyname = evaluate.get_primary_and_result(self.scope,
-                                                          node.func)
+        primary, pyname = evaluate.eval_node2(self.scope, node.func)
         if pyname is None:
             return
         pyfunction = pyname.get_object()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.