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

Method __iter__

Solutions/9_4/structly/structure.py:32–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 ', '.join(repr(getattr(self, name)) for name in self._fields))
31
32 def __iter__(self):
33 for name in self._fields:
34 yield getattr(self, name)
35
36 def __eq__(self, other):
37 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