MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / __iter__

Method __iter__

Solutions/8_6/structure.py:30–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 ', '.join(repr(getattr(self, name)) for name in self._fields))
29
30 def __iter__(self):
31 for name in self._fields:
32 yield getattr(self, name)
33
34 def __eq__(self, other):
35 return isinstance(other, type(self)) and tuple(self) == tuple(other)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected