MCPcopy Create free account
hub / github.com/python/mypy / visit_box

Method visit_box

mypyc/transform/log_trace.py:115–120  ·  view source on GitHub ↗
(self, op: Box)

Source from the content-addressed store, hash-verified

113 return self.log(op, name, f"{op.class_type.name}.{op.attr}")
114
115 def visit_box(self, op: Box) -> Value:
116 if op.src.type is none_rprimitive:
117 # Boxing 'None' is a very quick operation, so we don't log it.
118 return self.add(op)
119 else:
120 return self.log(op, "box", str(op.src.type))
121
122 def visit_unbox(self, op: Unbox) -> Value:
123 return self.log(op, "unbox", str(op.type))

Callers

nothing calls this directly

Calls 3

logMethod · 0.95
strClass · 0.85
addMethod · 0.45

Tested by

no test coverage detected