MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __repr__

Method __repr__

example_code/item_051.py:227–234  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

225
226
227 def __repr__(self):
228 return (
229 f"{type(self).__module__}"
230 f".{type(self).__name__}("
231 f"red={self.red!r}, "
232 f"green={self.green!r}, "
233 f"blue={self.blue!r})"
234 )
235
236
237print("Example 25")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected