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

Method keyrefs

Lib/weakref.py:385–395  ·  view source on GitHub ↗

Return a list of weak references to the keys. The references are not guaranteed to be 'live' at the time they are used, so the result of calling the references needs to be checked before being used. This can be used to avoid creating references that will cause the g

(self)

Source from the content-addressed store, hash-verified

383 yield value
384
385 def keyrefs(self):
386 """Return a list of weak references to the keys.
387
388 The references are not guaranteed to be 'live' at the time
389 they are used, so the result of calling the references needs
390 to be checked before being used. This can be used to avoid
391 creating references that will cause the garbage collector to
392 keep the keys around longer than needed.
393
394 """
395 return list(self.data)
396
397 def popitem(self):
398 while True:

Callers 1

test_weak_keyed_itersMethod · 0.80

Calls 1

listClass · 0.85

Tested by 1

test_weak_keyed_itersMethod · 0.64