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

Method __repr__

Solutions/7_3/structure.py:15–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 raise AttributeError('No attribute %s' % name)
14
15 def __repr__(self):
16 return '%s(%s)' % (type(self).__name__,
17 ', '.join(repr(getattr(self, name)) for name in self._fields))
18
19 @classmethod
20 def from_row(cls, row):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected