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

Method __repr__

Solutions/6_4/structure.py:12–14  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10 raise AttributeError('No attribute %s' % name)
11
12 def __repr__(self):
13 return '%s(%s)' % (type(self).__name__,
14 ', '.join(repr(getattr(self, name)) for name in self._fields))
15
16 @classmethod
17 def create_init(cls):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected