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

Method proxyval

Tools/gdb/libpython.py:1335–1345  ·  view source on GitHub ↗
(self, visited)

Source from the content-addressed store, hash-verified

1333 yield PyObjectPtr.from_pyobject_ptr(key)
1334
1335 def proxyval(self, visited):
1336 # Guard against infinite loops:
1337 if self.as_address() in visited:
1338 return ProxyAlreadyVisited('%s(...)' % self.safe_tp_name())
1339 visited.add(self.as_address())
1340
1341 members = (key.proxyval(visited) for key in self)
1342 if self.safe_tp_name() == 'frozenset':
1343 return frozenset(members)
1344 else:
1345 return set(members)
1346
1347 def write_repr(self, out, visited):
1348 # Emulate Python's set_repr

Callers

nothing calls this directly

Calls 6

ProxyAlreadyVisitedClass · 0.85
setFunction · 0.85
as_addressMethod · 0.45
safe_tp_nameMethod · 0.45
addMethod · 0.45
proxyvalMethod · 0.45

Tested by

no test coverage detected