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

Method __repr__

example_code/item_063.py:91–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89 self.y = y
90
91 def __repr__(self):
92 return f"Point2D({self.x}, {self.y})"
93
94before = BetterPoint2D(5, 3)
95print("Before: ", before)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected