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

Method __repr__

Solutions/9_3/structly/structure.py:28–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 raise AttributeError('No attribute %s' % name)
27
28 def __repr__(self):
29 return '%s(%s)' % (type(self).__name__,
30 ', '.join(repr(getattr(self, name)) for name in self._fields))
31
32 def __iter__(self):
33 for name in self._fields:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected