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

Class BetterPoint2D

example_code/item_063.py:85–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84print("Example 4")
85class BetterPoint2D(Deserializable):
86 def __init__(self, x, y):
87 super().__init__(x, y)
88 self.x = x
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 1

item_063.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected