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

Method __str__

Tools/gdb/libpython.py:1384–1388  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1382 _typename = 'PyBytesObject'
1383
1384 def __str__(self):
1385 field_ob_size = self.field('ob_size')
1386 field_ob_sval = self.field('ob_sval')
1387 char_ptr = field_ob_sval.address.cast(_type_unsigned_char_ptr())
1388 return ''.join([chr(char_ptr[i]) for i in safe_range(field_ob_size)])
1389
1390 def proxyval(self, visited):
1391 return str(self)

Callers

nothing calls this directly

Calls 5

_type_unsigned_char_ptrFunction · 0.85
safe_rangeFunction · 0.85
fieldMethod · 0.80
castMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected