MCPcopy Index your code
hub / github.com/python/cpython / write_repr

Method write_repr

Tools/gdb/libpython.py:1245–1266  ·  view source on GitHub ↗
(self, out, visited)

Source from the content-addressed store, hash-verified

1243 return None
1244
1245 def write_repr(self, out, visited):
1246 if self.is_optimized_out():
1247 out.write(FRAME_INFO_OPTIMIZED_OUT)
1248 return
1249 lineno = self.current_line_num()
1250 lineno = str(lineno) if lineno is not None else "?"
1251 out.write('Frame 0x%x, for file %s, line %s, in %s ('
1252 % (self.as_address(),
1253 self.co_filename.proxyval(visited),
1254 lineno,
1255 self.co_name.proxyval(visited)))
1256 first = True
1257 for pyop_name, pyop_value in self.iter_locals():
1258 if not first:
1259 out.write(', ')
1260 first = False
1261
1262 out.write(pyop_name.proxyval(visited))
1263 out.write('=')
1264 pyop_value.write_repr(out, visited)
1265
1266 out.write(')')
1267
1268 def as_address(self):
1269 return int(self._gdbval)

Callers 10

get_truncated_reprMethod · 0.95
test_basicMethod · 0.45
test_repr_nullMethod · 0.45
write_field_reprMethod · 0.45
_write_instance_reprFunction · 0.45
write_reprMethod · 0.45
write_reprMethod · 0.45
write_reprMethod · 0.45
write_reprMethod · 0.45
write_reprMethod · 0.45

Calls 7

is_optimized_outMethod · 0.95
current_line_numMethod · 0.95
as_addressMethod · 0.95
iter_localsMethod · 0.95
strFunction · 0.85
writeMethod · 0.45
proxyvalMethod · 0.45

Tested by 2

test_basicMethod · 0.36
test_repr_nullMethod · 0.36