MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __iter__

Method __iter__

example_code/item_025.py:129–133  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 del self.data[key]
128
129 def __iter__(self):
130 keys = list(self.data.keys())
131 keys.sort()
132 for key in keys:
133 yield key
134
135 def __len__(self):
136 return len(self.data)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected