def visit_Attribute(self, node): value = self.visit(node.value) scope = self.scopeStack.peek() attr = sage.buildName(node.attr, scope) return sage.buildAttr(value, attr)
def visit_NoneType(self, node): scope = self.scopeStack.peek() return sage.buildName("None", scope)
def visit_alias(self, node): scope = self.scopeStack.peek() id = node.asname or node.name init = node.asname and self.visit(node.name) name = sage.buildName(id, scope) return (init and sage.buildAssign(name, init)) or name
def visit_Ellipsis(self, node): scope = self.scopeStack.peek() return sage.buildName("...", scope)
def visit_Name(self, node): scope = self.scopeStack.peek() return sage.buildName(node.id, scope)