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

Method __repr__

Solutions/6_3/structure.py:22–24  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 raise AttributeError('No attribute %s' % name)
21
22 def __repr__(self):
23 return '%s(%s)' % (type(self).__name__,
24 ', '.join(repr(getattr(self, name)) for name in self._fields))
25
26 @classmethod
27 def set_fields(cls):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected