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

Method __iter__

Lib/importlib/metadata/_itertools.py:159–165  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

157 self._cache[item_value].append(item)
158
159 def __iter__(self):
160 for item in self._it:
161 item_value = self._key(item)
162 if self._validator(item_value):
163 self._cache[item_value].append(item)
164
165 yield from self._cache.keys()
166
167 def __getitem__(self, value):
168 if not self._validator(value):

Callers

nothing calls this directly

Calls 3

_keyMethod · 0.80
appendMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected