MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __iter__

Method __iter__

tools/python-3.11.9-amd64/Lib/_weakrefset.py:63–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 discard(item)
62
63 def __iter__(self):
64 with _IterationGuard(self):
65 for itemref in self.data:
66 item = itemref()
67 if item is not None:
68 # Caveat: the iterator will keep a strong reference to
69 # `item` until it is resumed or closed.
70 yield item
71
72 def __len__(self):
73 return len(self.data) - len(self._pending_removals)

Callers

nothing calls this directly

Calls 1

_IterationGuardClass · 0.85

Tested by

no test coverage detected