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

Method __repr__

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

Source from the content-addressed store, hash-verified

66 self.y = y
67
68 def __repr__(self):
69 return f"Point2D({self.x}, {self.y})"
70
71point = Point2D(5, 3)
72print("Object: ", point)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected