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

Class Point2D

example_code/item_063.py:62–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61print("Example 2")
62class Point2D(Serializable):
63 def __init__(self, x, y):
64 super().__init__(x, y)
65 self.x = x
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 1

item_063.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected