MCPcopy Index your code
hub / github.com/RustPython/RustPython / visit_Attribute

Method visit_Attribute

Lib/inspect.py:2201–2211  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

2199
2200 class RewriteSymbolics(ast.NodeTransformer):
2201 def visit_Attribute(self, node):
2202 a = []
2203 n = node
2204 while isinstance(n, ast.Attribute):
2205 a.append(n.attr)
2206 n = n.value
2207 if not isinstance(n, ast.Name):
2208 raise ValueError
2209 a.append(n.id)
2210 value = ".".join(reversed(a))
2211 return wrap_value(value)
2212
2213 def visit_Name(self, node):
2214 if not isinstance(node.ctx, ast.Load):

Callers

nothing calls this directly

Calls 5

isinstanceFunction · 0.85
reversedFunction · 0.85
wrap_valueFunction · 0.85
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected