1. Ronny Pfannschmidt
  2. rope-qickfix


Ali Gholami Rudi  committed 537b685

evaluate: renamed get_primary_and_result() to eval_node2

  • Participants
  • Parent commits 12bd57b
  • Branches trunk

Comments (0)

Files changed (2)

File rope/base/evaluate.py

View file
  • Ignore whitespace
     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()

File rope/base/oi/soa.py

View file
  • Ignore whitespace
     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:
         pyfunction = pyname.get_object()